Skip to content

Commit

Permalink
2024-04-10
Browse files Browse the repository at this point in the history
  • Loading branch information
pu2rile committed Apr 10, 2024
1 parent 3e585b5 commit 6e0107e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pu2rile/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@
| 1์ฐจ์‹œ | 2024.03.24 | DP | [ํ‰๋ฒ”ํ•œ ๋ฐฐ๋‚ญ](https://www.acmicpc.net/problem/12865) | [#3](https://github.com/AlgoLeadMe/AlgoLeadMe-10/pull/3#issue-2205834078)|
| 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) | [#]()
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 6e0107e

Please sign in to comment.