Skip to content

Commit 0b43921

Browse files
committed
[BOJ] #30802. 웰컴키트 / 브론즈3 / 22분 / 성공
1 parent 35025db commit 0b43921

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import sys
2+
from math import ceil
3+
input = sys.stdin.readline
4+
5+
n = int(input()) # 참가자 수
6+
sizes = list(map(int, input().split())) # 티셔츠사이즈별 신청자 수(S, M, L, XL, XXL, XXXL)
7+
t, p = map(int, input().split()) # t: 티셔츠 묶음 수, p: 펜 묶음 수
8+
9+
# t장씩 최소 몇 묶음 주문해야 하는지 계산
10+
min_t_shirts = 0
11+
for s in sizes:
12+
min_t_shirts += ceil(s / t)
13+
print(min_t_shirts)
14+
15+
# p자루씩 최대 몇 묶음 주문할 수 있는지와, 그 때 펜을 한 자루씩 몇 개 주문하는지 계산
16+
print(n // p, n % p)

0 commit comments

Comments
 (0)