BOJ - 13458 - 시험 감독

Updated:

import sys

def solution():
    N = int(sys.stdin.readline())
    A = list(map(int, sys.stdin.readline().split()))
    B, C = map(int, sys.stdin.readline().split())
    ret = 0

    for i in range(N):
        if A[i] > 0:
            A[i] -= B
            ret += 1

        if A[i] > 0:
            ret += int(A[i] / C)

            if A[i] % C != 0:
                ret += 1

    print(ret)

solution()

https://www.acmicpc.net/problem/13458

Categories:

Updated:

Leave a comment