We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 89d02d3 commit c2decd0Copy full SHA for c2decd0
Level_2/최고의 집합/main.py
@@ -0,0 +1,11 @@
1
+def solution(n, s):
2
+ if s//n == 0:
3
+ return [-1]
4
+ answer = [s//n for i in range(n)]
5
+ remain = s % n
6
+ index = -1
7
+ while remain > 0:
8
+ answer[index] += 1
9
+ remain -= 1
10
+ index -= 1
11
+ return answer
0 commit comments