首页 > 其他分享 >41_水仙花数

41_水仙花数

时间:2023-01-19 19:22:50浏览次数:27  
标签:count 10 41 print 100 水仙花

复习Python表示幂的知识点:

1、**

2、pow(数字,次数)

#水仙花数
count=0
for i in range(100,1000):
    m=i%10#个位
    n=i//10%10#十位
    k=i//100#百位
    if i==(m**3+n**3+k**3):
        print(i)
        count+=1
print(f"水仙花个数为{count}")

 

标签:count,10,41,print,100,水仙花
From: https://www.cnblogs.com/fan-study/p/17061996.html

相关文章