[백준 13458] 시험감독 (Python)
2024. 3. 5. 22:36ㆍ알고리즘
N = int(input())
A = list(map(int, input().split()))
B, C = map(int, input().split())
answer = 0
for i in range(len(A)):
if A[i] <= B:
answer += 1
else:
answer += 1
if (A[i] - B) % C == 0:
answer += int((A[i] - B) / C)
else:
answer += int((A[i] - B) / C + 1)
print(answer)
'알고리즘' 카테고리의 다른 글
[LeetCode] Daily Temperatures (Python) (0) | 2024.03.06 |
---|---|
[LeetCode] Valid Parentheses (Python) (1) | 2024.03.06 |
[LeetCode] Perfect Squares (Python) (0) | 2024.03.05 |
[LeetCode] Open the Lock (Python) (0) | 2024.03.05 |
[LeetCode] Number of Islands (Python) (0) | 2024.03.05 |