본문 바로가기
python-algorithm

[백준] 13300

by 무적김두칠 2021. 1. 14.

1
2
3
4
5
6
7
8
9
10
11
12
import math
n,k=map(int, input().split())
boys=[0]*6
girls=[0]*6
for _ in range(n):
    s,y=map(int,input().split())
    if s==0: girls[y-1]+=1
    else:boys[y-1]+=1
cnt=0
for i in range(6):
    cnt+=int (math.ceil( boys[i]/k)) +int (math.ceil( girls[i]/k))
print(cnt)
cs
반응형

'python-algorithm' 카테고리의 다른 글

[백준] 13410  (0) 2021.01.14
[백준] 13304  (0) 2021.01.14
[백준] 13163  (0) 2021.01.14
[백준] 12836  (0) 2021.01.14
[백준] 12813  (0) 2021.01.13

댓글