for i in range(100,1000): m=i//100 n=(i-m*100)//10 o=i-m*100-n*10 if i==m**3+n**3+o**3: print(i)
Standard input is empty
153 370 371 407
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!