You are viewing a single comment's thread. Return to all comments →
n = input() s1 = sum(map(int,n)) n = int(n) s2 = 0 i=1 while n!=1: i+=1 if n%i == 0: n//=i s2 += sum(map(int,str(i))) i = 1 print(1) if s1==s2 else print(0)
Seems like cookies are disabled on this browser, please enable them to open this website
Identify Smith Numbers
You are viewing a single comment's thread. Return to all comments →
My python solution