백준_13458_시험 감독

임정민·2023년 1월 7일
2

알고리즘 문제풀이

목록 보기
15/173
post-thumbnail

코딩테스트 연습 스터디 진행중 입니다. ✍✍✍
Notion : https://www.notion.so/1c911ca6572e4513bd8ed091aa508d67

문제

https://www.acmicpc.net/problem/13458

[나의 풀이]

import math

N = int(input())
A = list(map(int, input().split()))
a, b = map(int, input().split())

total = 0
for class1 in A:
    total += 1

    if class1 - a >= 0: # 부시험관이 1명 이상 필요할 때 
        total += math.ceil((class1-a)/b) # ceil : 올림

print(total)
profile
https://github.com/min731

0개의 댓글