Skip to content

Commit 517a828

Browse files
committed
[BOJ] #2231.분해합/ 브론즈2 / 13분(O)
1 parent 7178295 commit 517a828

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

.DS_Store

0 Bytes
Binary file not shown.

learntosurf/.DS_Store

6 KB
Binary file not shown.
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)