You are viewing a single comment's thread. Return to all comments →
Python code-:
count = 0 for i in range(int(input()),int(input())+1): s = str(i**2) x = s[len(s)//2:] y = s[0:len(s)//2] if x=='':x=0 if y=='':y=0 if int(x)+int(y)==i:print(i,end=' ');count+=1 if count==0:print("INVALID RANGE")
Seems like cookies are disabled on this browser, please enable them to open this website
Modified Kaprekar Numbers
You are viewing a single comment's thread. Return to all comments →
Simple and easy to undersatand
Python code-: