Digital special basic training questions
Resource limitation
time limit: 1.0s memory limit: 512.0MB
problem description
153 is a very special number, which is equal to that of cubic and each digit, i.e., 153 = 1 . 1 1 + 5 . 5 5 + 3 . 3 3 All three decimal demand programming to meet this condition.
Output format
output three decimal number satisfying the condition in ascending order of each number per line.
for i in range(100,1000):
n,s=i,0
while n>0:
s+=pow((n%10),3)
n=int(n/10)
if s==i:
print(i,end="\n")