취준시절/백준

[백준 4673] 셀프 넘버 - Python

MAYMIN 2021. 8. 3. 18:38
728x90
SMALL
numList = [i for i in range(1,10001)]
resultList = []

for i in range(1,10001):
    for j in str(i):
        i+=int(j)
    resultList.append(i)
selfnumList = list(set(numList) - set(resultList))
selfnumList.sort()

for i in selfnumList:
    print(i)
728x90
LIST