Skip to content

Commit 8e74048

Browse files
committed
[BOJ] #2231.분해합 / 13분(O)
1 parent 5ae789c commit 8e74048

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
N = int(input())
2+
3+
4+
for i in range(1, N+1):
5+
answer = i + sum((map(int, str(i))))
6+
if answer == N:
7+
print(i)
8+
break
9+
if i == N: # 생성자가 없는 경우
10+
print(0)

0 commit comments

Comments
 (0)