728x90
반응형
https://www.acmicpc.net/problem/13458
import sys
input = sys.stdin.readline
N = int(input())
candidates = list(map(int, input().rsplit()))
main_viewer_ok, sub_viewer_ok = list(map(int, input().rsplit()))
viewer_number = 0
for candidate in candidates:
candidate -= main_viewer_ok
viewer_number += 1
if candidate <= 0:
continue
quitoent = candidate // sub_viewer_ok
remainder = candidate % sub_viewer_ok
if remainder > 0:
viewer_number = viewer_number + quitoent + 1
else:
viewer_number += quitoent
print(viewer_number)
728x90
반응형
'Algorithm > Baekjoon' 카테고리의 다른 글
BOJ 1753 최단경로 Python3 - 다익스트라 알고리즘 (0) | 2023.07.15 |
---|---|
BOJ 2606 바이러스 Python3 (0) | 2023.07.06 |
BOJ 1463 1로 만들기 Python3 (0) | 2023.06.28 |
BOJ 12100 2048 (Easy) Python3 (0) | 2023.06.27 |
BOJ 1992 쿼드트리 python3 (0) | 2023.06.22 |