반응형
파이썬
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
|
import sys
def who_champ(now_list):
new_list = now_list[::]
new_list.sort(reverse=True)
ans = [0 for i in range(len(now_list))]
fuck_dict = {}
real_rank = 0
temp_score = 3001
for k in new_list:
if temp_score>k:
real_rank +=1
fuck_dict[k] = real_rank
temp_score = k
elif temp_score==k:
real_rank +=1
for i in now_list:
print(fuck_dict[i],end=' ')
print()
how_many = int(sys.stdin.readline())
first = False
answer = ''
for i in sys.stdin:
a = list(map(int,i.split(" ")))
who_champ(a)
if first == False:
total_list = a
first = True
else:
for a_i in range(how_many):
total_list[a_i] += a[a_i]
who_champ(total_list)
|
cs |
Be positive!
Be rich!
Live your life!
반응형
'Programming' 카테고리의 다른 글
강화학습_1_0729 (0) | 2023.07.29 |
---|---|
현대_Softeer_level2_GBC_파이썬_230720 (0) | 2023.07.20 |
현대_Softeer_level2_바이러스_파이썬 (0) | 2023.01.17 |
현대_Softeer_level2_비밀 메뉴_파이썬 (0) | 2023.01.17 |
현대_Softeer_level2_지도 자동 구축_파이썬 (0) | 2023.01.17 |