[実施-4673]セルフサービス番号

1969 ワード

numbers = set(range(1, 10001))
remove_set = set()

for number in numbers:
    for num in str(number):
        number += int(num)
    remove_set.add(number)

self_numbers = numbers-remove_set
for self_num in sorted(self_numbers):
    print(self_num)