题解 | #牛牛的四叶玫瑰数#
牛牛的四叶玫瑰数
http://www.nowcoder.com/practice/b1ee23676ad54919b50aa1a09da1704e
BC164 牛牛的四叶玫瑰数
思路:
step1:逐位计算;
代码如下:
def fn(m,n):
for i in range(m,n+1):
x = ''
x += str(i)
y = len(str(i))
count = 0
for j in range(y):
count += (int(x[j]))**4
if count == i:
print(i,end=' ')
m,n = list(map(int,input().split()))
fn(m,n)