n = 100while n < 1000: i = str(n) s = int(i[0])**3+int(i[1])**3+int(i[2])**3 if s == n: print(s) n +=1