1
CupCupFun OP 突然发现格式有问题,编辑的时候有缩进的,是一定要用 md 编辑才能正确显示缩进么?
|
2
necomancer 2020-06-16 04:01:14 +08:00
def nextNum():
....i = 0 ....while True: ........inv = int(str(i)[::-1]) ........if i != inv and ((i+inv) % (i-inv) ==0): ............yield i ........i += 1 for i, num in enumerate(nextNum()): ....if i == n: # stop at nth ........break ....print(num) |