Created
November 11, 2019 13:36
-
-
Save inspirit941/2a3b321333b64f7e1d77ab9bac0b412e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import math | |
n = int(sys.stdin.readline()) | |
arr = list(map(int, sys.stdin.readline().split())) | |
b, c = map(int, sys.stdin.readline().split()) | |
# 어쨌든 총감독 한 명씩은 필요함 | |
result = len(arr) | |
# 총감독 한 명으로 부족한 방 | |
rest = [i - b for i in arr if i - b > 0] | |
# 보조감독은 얼마나 필요한지 | |
rest2 = [math.ceil(i / c) for i in rest] | |
result += sum(rest2) | |
print(result) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment