https://www.acmicpc.net/problem/17224
N, L, K = map(int, input().split())
problem = [[0]*2 for _ in range(N)]
for i in range(N):
problem[i] = list(map(int, input().split()))
count, num = 0, 0
for i in range(N):
if problem[i][1] <= L and num < K:
count += 140
num += 1
for j in range(N):
if problem[j][0] <= L and problem[j][1] > L and num < K:
count += 100
num += 1
print(count)
N, L, K = map(int, input(),split())
easy, hard = 0, 0
for i in range(N):
sub1, sub2 = map(int, input().split())
if sub2 <= L:
hard += 1
elif sub1 <= L:
easy += 1
ans = min(hard, K) * 140
if hard < K:
ans = min(K-hard, easy) * 100
print(ans)
'알고리즘 > 백준 (Pyhthon)' 카테고리의 다른 글
[알고리즘] 백준 2480 주사위 세개 / python (0) | 2020.03.13 |
---|---|
[알고리즘] 백준 9037 The candy war / python (0) | 2020.03.13 |
[알고리즘] 백준 1932 정수 삼각형 / python, DP (0) | 2020.02.28 |
[알고리즘] 백준 1120 문자열 / python (0) | 2020.02.28 |
[알고리즘] 백준 1012 유기농 배추 / python (0) | 2020.02.27 |