You are viewing a single comment's thread. Return to all comments →
g=[] for i in range(p,q+1): a=str(i**2) b=a[:len(a)//2] c=a[len(a)//2:] if c=='': c=0 elif b=='': b=0 if int(b)+int(c)==i:g.append(i) print('INVALID RANGE')if g==[]else print(*g)
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 →