QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#59293#5004. FinalistsQOJ_Test2#AC ✓27ms8412kbPython3415b2022-10-29 06:01:242022-10-29 06:01:25

Judging History

你现在查看的是最新测评结果

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2022-10-29 06:01:25]
  • 评测
  • 测评结果:AC
  • 用时:27ms
  • 内存:8412kb
  • [2022-10-29 06:01:24]
  • 提交

answer

N = int(input().strip())
site_score = {}
for i in range(6):
    s, pt, pu, rt, ru, f = input().strip().split()
    score = 56 * int(ru)+ 24 * int(rt) + 14 * int(pu) + 6 * int(pt) + 30 * int(f)
    site_score[s] = score

x = sum([1 for s, score in site_score.items() if score >= site_score['Taiwan']])
# print(x)
print(N//6 + (1 if x <= N % 6 else 0))
'''
for s, score in site_score.items():
    print(s, score)
'''

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 27ms
memory: 8276kb

input:

17
Japan       500  95  40 30  5
Vietnam     400  50 150 40 20
Indonesia   700  25  80 35 20
Taiwan      200  30 100 35  1
Korea       600 100 100 70  0
Philippines  50  10  40 15 15

output:

3

result:

ok single line: '3'

Test #2:

score: 0
Accepted
time: 4ms
memory: 8408kb

input:

16
Japan       500      95  40 30  5
Taiwan      200 30  100 35  1
Indonesia   700 25   80 35 20
Philippines  50 10    40 15 15
Korea       600 100    100 70  0
Vietnam     400  50     150 40 20

output:

2

result:

ok single line: '2'

Test #3:

score: 0
Accepted
time: 11ms
memory: 8368kb

input:

16
Vietnam 321 51 113 48 0
Indonesia 690 19 60 17 15
Korea 333 54 59 39 0
Japan 294 86 40 29 0
Taiwan 145 26 101 30 0
Philippines 29 26 50 30 4

output:

2

result:

ok single line: '2'

Test #4:

score: 0
Accepted
time: 19ms
memory: 8412kb

input:

17
Vietnam 321 51 113 48 0
Indonesia 690 19 60 17 15
Korea 333 54 59 39 0
Japan 294 86 40 29 0
Taiwan 145 26 101 30 0
Philippines 29 26 50 30 4

output:

3

result:

ok single line: '3'

Test #5:

score: 0
Accepted
time: 15ms
memory: 8348kb

input:

17
Japan       294 86  40 29  0
Philippines 145 26 101 30  0
Taiwan       29 26  50 30  4
Vietnam     321 51 113 48  0
Indonesia   690 19  60 17 15
Korea       333 54  59 39  0

output:

2

result:

ok single line: '2'