Skip to content

Commit

Permalink
Merge pull request #18 from AlgoLeadMe/5-pu2rile
Browse files Browse the repository at this point in the history
5-pu2rile
  • Loading branch information
pu2rile authored Jul 11, 2024
2 parents 857ed43 + b79db77 commit 1920fc3
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pu2rile/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
| 2์ฐจ์‹œ | 2024.03.29 | ๊ตฌํ˜„ | [OXํ€ด์ฆˆ](https://www.acmicpc.net/problem/8958) | [#6](https://github.com/AlgoLeadMe/AlgoLeadMe-10/pull/6#issue-2214931034)|
| 3์ฐจ์‹œ | 2024.04.02 | ๋ฌธ์ž์—ด | [ํฌ๋กœ์•„ํ‹ฐ์•„ ์•ŒํŒŒ๋ฒณ](https://www.acmicpc.net/problem/8958) | [#10](https://github.com/AlgoLeadMe/AlgoLeadMe-10/pull/10#issue-2220631332)
| 4์ฐจ์‹œ | 2024.04.08 | ์Šคํƒ | [์ œ๋กœ](https://www.acmicpc.net/problem/10773) | [#15](https://github.com/AlgoLeadMe/AlgoLeadMe-10/pull/15#issue-2229909173)
| 5์ฐจ์‹œ | 2024.04.10 | ๊ทธ๋ฆฌ๋”” ์•Œ๊ณ ๋ฆฌ์ฆ˜ | [๊ตญํšŒ์˜์› ์„ ๊ฑฐ](https://www.acmicpc.net/problem/1417) | [#18](https://github.com/AlgoLeadMe/AlgoLeadMe-10/pull/18#issue-2235862658)
| 5์ฐจ์‹œ | 2024.04.10 | ๊ทธ๋ฆฌ๋”” ์•Œ๊ณ ๋ฆฌ์ฆ˜ | [๊ตญํšŒ์˜์› ์„ ๊ฑฐ](https://www.acmicpc.net/problem/1417) | [#18](https://github.com/AlgoLeadMe/AlgoLeadMe-10/pull/18#issue-2235862658)
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
N = int(input())
dasom = int(input())
vote = []
cnt = 0

for _ in range(N-1):
vote.append(int(input()))

vote.sort(reverse=True) #๋‚ด๋ฆผ์ฐจ์ˆœ ์ •๋ ฌ

if N == 1:
print('0')
else:
while vote[0] >= dasom:
dasom += 1
vote[0] -= 1
cnt += 1
vote.sort(reverse=True)
print(cnt)

0 comments on commit 1920fc3

Please sign in to comment.