Skip to content

Commit fe1d215

Browse files
authored
Merge pull request #81 from learntosurf/main
Learntosurf / 11월 2주차 / 1문제
2 parents b0ee7e9 + c4b1b78 commit fe1d215

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)