try: while True: Yes = False a = input() b = a.find(" ") c = eval(a[: b]) d = eval(a[b + 1 :]) i = c for i in range(c, d): k = str(i) e = len(k) j = 0 sum = 0 for j in range(e): sum += eval(k[j]) ** e if sum == i: print(i, end = " ") Yes = True if Yes == False: print("none") print() except EOFError: pass
看了一些其他人的解法,只能說太高深看不懂