1.求数列的和
import math
while True:
try:
l=list(map(int,input().strip().split()))
n=l[0]
m=l[1]
ll=[]
ll.append(n)
for i in range(m-1):
n=math.sqrt(n)
ll.append(n)
p=sum(ll)
print('%.2f'%p) #输出结果保留两位小数
except EOFError:
break
2.水仙花数
while True:
try:
n=list(map(int,input().strip().split()))
ll=[]
for i in range(n[0],n[1]+1):
a=i%10
b=int(i/10)%10
c=int(i/100)
if i==a**3+b**3+c**3:
ll.append(i)
if len(ll)==0:
print('no')
else:
for x in ll:
print(x,end=' ')
except EOFError:
break