Skip to content

Baekjoon 1350

1. Problem

문제 확인하기

2. Solution

n = int(input())
lst = list(map(int, input().split()))
m = int(input())
sum = 0
for i in lst:
    if i % m == 0:
        sum += i // m
    else:
        sum += i // m + 1
print(sum * m)