We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents b0ee7e9 + c4b1b78 commit fe1d215Copy full SHA for fe1d215
1 file changed
BruteForce/2024-11-04-[BOJ]-#2231-분해합.py
@@ -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