Submission #122768


Source Code Expand

Copy
#!/usr/bin/env python
# -*- coding:utf-8 -*-

import sys

def update_rate(cur_rate, lesson_rate):
    return float( cur_rate + lesson_rate ) / 2


if __name__ == '__main__':
    input_query=list()
    for line in sys.stdin:
        input_query.append(line.strip())

    num_lessons, max_lessons  = input_query[0].split(' ')
    lesson_rates = [ int(num) for num in  input_query[1].split(' ') ]

    cur_rate=0
    for new_lesson_rate in lesson_rates.sort()[num_lessons - max_lessons:]:
        cur_rate = update_rate(cur_rate, new_lesson_rate)

    return cur_rate

Submission Info

Submission Time
Task C - AtCoderプログラミング講座
User dummywitty
Language Python (2.7.3)
Score 0
Code Size 587 Byte
Status RE
Exec Time 225 ms
Memory 8356 KB

Judge Result

Set Name All
Score / Max Score 0 / 100
Status
RE × 34
Set Name Test Cases
All 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, 00_sample_04.txt, test_01.txt, test_02.txt, test_03.txt, test_04.txt, test_05.txt, test_06.txt, test_07.txt, test_08.txt, test_09.txt, test_10.txt, test_11.txt, test_12.txt, test_13.txt, test_14.txt, test_15.txt, test_16.txt, test_17.txt, test_18.txt, test_19.txt, test_20.txt, test_21.txt, test_22.txt, test_23.txt, test_24.txt, test_25.txt, test_26.txt, test_27.txt, test_28.txt, test_29.txt, test_30.txt
Case Name Status Exec Time Memory
00_sample_01.txt RE 225 ms 8208 KB
00_sample_02.txt RE 117 ms 8240 KB
00_sample_03.txt RE 116 ms 8240 KB
00_sample_04.txt RE 111 ms 8252 KB
test_01.txt RE 120 ms 8248 KB
test_02.txt RE 116 ms 8244 KB
test_03.txt RE 122 ms 8240 KB
test_04.txt RE 121 ms 8244 KB
test_05.txt RE 113 ms 8244 KB
test_06.txt RE 112 ms 8240 KB
test_07.txt RE 119 ms 8248 KB
test_08.txt RE 117 ms 8240 KB
test_09.txt RE 112 ms 8244 KB
test_10.txt RE 118 ms 8244 KB
test_11.txt RE 115 ms 8240 KB
test_12.txt RE 123 ms 8244 KB
test_13.txt RE 120 ms 8248 KB
test_14.txt RE 123 ms 8240 KB
test_15.txt RE 118 ms 8244 KB
test_16.txt RE 122 ms 8232 KB
test_17.txt RE 112 ms 8240 KB
test_18.txt RE 128 ms 8356 KB
test_19.txt RE 118 ms 8240 KB
test_20.txt RE 123 ms 8284 KB
test_21.txt RE 117 ms 8244 KB
test_22.txt RE 122 ms 8248 KB
test_23.txt RE 123 ms 8220 KB
test_24.txt RE 121 ms 8240 KB
test_25.txt RE 115 ms 8292 KB
test_26.txt RE 121 ms 8244 KB
test_27.txt RE 121 ms 8240 KB
test_28.txt RE 120 ms 8288 KB
test_29.txt RE 122 ms 8240 KB
test_30.txt RE 121 ms 8240 KB