BOJ

백준 파이썬 2231 분해합

Coding_SJ 2020. 3. 22. 07:25

 

 

내 풀이

1
2
3
4
5
6
7
8
9
10
11
12
13
= int(input())
= 0
= []
while 1:
    n += 1
    if a == (n + sum(int(i) for i in str(n))):
        A.append(n)
    if n==a:
        break
if len(A) == 0:
    print(0)
elif len(A) != 0:
    print(min(A))
cs

 

내가 이렇게까지 한 문제를 빠르게 푼 적이 있었나 싶다...

진짜 많이 성장했네