Skip to content

Instantly share code, notes, and snippets.

@inspirit941
Created November 11, 2019 13:36
Show Gist options
  • Save inspirit941/2a3b321333b64f7e1d77ab9bac0b412e to your computer and use it in GitHub Desktop.
Save inspirit941/2a3b321333b64f7e1d77ab9bac0b412e to your computer and use it in GitHub Desktop.
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