https://www.acmicpc.net/problem/30802
<aside> 📌 웰컴키트: 티셔츠 한 장 + 펜 한 자루
</aside>
T 로 나눈 몫에 올림처리하면 된다.N을 P로 나눈 몫(N//P)이 최대 주문할 수 있는 묶음 수이고,N을 P로 나눈 나머지(N%P)가 한 자루씩 주문해야 하는 수이다.import sys
from math import ceil
input = sys.stdin.readline
n = int(input()) # 참가자 수
sizes = list(map(int, input().split())) # 티셔츠사이즈별 신청자 수(S, M, L, XL, XXL, XXXL)
t, p = map(int, input().split()) # t: 티셔츠 묶음 수, p: 펜 묶음 수
min_t_shirts = 0
for s in sizes:
min_t_shirts += ceil(s / t)
print(min_t_shirts) # t장씩 최소 몇 묶음 주문해야 하는지
print(n // p, n % p)# p자루씩 최대 몇 묶음 주문할 수 있는지와, 그 때 펜을 한 자루씩 몇 개 주문하는지

나와 다른 방법으로 풀이하신 분이 계셔서 가져왔다. https://velog.io/@o_seongblll_/백준-30802-python