题解 | #变种水仙花#
变种水仙花
http://www.nowcoder.com/practice/c178e3f5cc4641dfbc8b020ae79e2b71
补齐5位切片求值
for i in range(10000,100000):
n="{:05d}".format(i)
lily_number=int(n[:1])*int(n[1:])+int(n[:2])*int(n[2:])+int(n[:3])*int(n[3:])+int(n[:4])*int(n[4:])
if lily_number==i:
print(i,end=" ")
print()