https://www.acmicpc.net/problem/15953
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
n = int(input())
def How_Much_2017(rank):
if(rank==0):
return 0
elif(rank<=1):
return 5000000
elif(rank<=3):
return 3000000
elif(rank<=6):
return 2000000
elif(rank<=10):
return 500000
elif(rank<=15):
return 300000
elif(rank<=21):
return 100000
else:
return 0
def How_Much_2018(rank):
if(rank==0):
return 0
elif(rank<=1):
return 5120000
elif(rank<=3):
return 2560000
elif(rank<=7):
return 1280000
elif(rank<=15):
return 640000
elif(rank<=31):
return 320000
else:
return 0
result = []
for i in range(n):
rank_17, rank_18 = map(int, input().split())
result_money = How_Much_2017(rank_17) + How_Much_2018(rank_18)
result.append(result_money)
for i in range(n):
print(result[i])
|
cs |
'자료구조와 알고리즘 > Baekjoon' 카테고리의 다른 글
[백준][C++] 2490번: 윷놀이 (0) | 2019.09.29 |
---|---|
[백준][C++][Python] 2752번: 세 수 정렬 (0) | 2019.09.29 |
[백준][그리디 알고리즘][파이썬] 1541.잃어버린 괄호 (0) | 2019.08.26 |
[백준][그리디 알고리즘][파이썬] 11047.동전 0 (0) | 2019.08.01 |
[백준][그리디 알고리즘][파이썬] 11399.ATM (0) | 2019.07.30 |