thunderfighter/demo1/demo40 for in练习题.py

9 lines
237 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#100到999之间的水仙花数
#水仙花数举例153=1*1*1+5*5*5+10*10*10
for item in range(100,1000):
ge=item %10
shi=item//10%10
bai=item//100
if item==ge*ge*ge+shi*shi*shi+bai*bai*bai:
print(item)