-
2231 분해합코테 대비 python/백준 2023. 2. 3. 17:14
https://www.acmicpc.net/problem/2231
n = int(input()) result = 0 for i in range(1,n+1): s= list(map(int,str(i))) result = i +sum(s) if result == n: print(i) break if i==n: print(0)
'코테 대비 python > 백준' 카테고리의 다른 글
10989 수 정렬하기 정렬 잡기술 (0) 2023.02.06 1158 요세푸스 (0) 2023.02.06 1874 스택==> 다시풀기 (0) 2023.02.03 2800 스택 ==> 다시풀어보기 (0) 2023.02.02 2346 덱 rotate (0) 2023.02.02