본문 바로가기
백준

[python] 13458. 시험감독

by DylanMsK 2019. 8. 4.

문제 출처

13458. 시험감독

 

풀이


N = int(input())
nums = list(map(int, input().split()))
B, C = map(int, input().split())

tot = 0
for num in nums:
    num -= B
    tot += 1
    if num > 0:
        val, left = num // C, num % C
        if left:
            tot += val + 1
        else:
            tot += val

print(tot)