#2327645

Solution for 0124: League Match Score Sheet by peroon

Source Code Status Test Cases
    Policy: public     Reviewed: 3    
00.03 sec    7624 KB    29 lines     482 bytes    2017-05-20 05:47
# -*- coding: utf-8 -*-

import sys
import os
import math

for s in sys.stdin:
    n = int(s)
    if n == 0:
        break

    A = []

    for i in range(n):
        lst = input().split()
        name = lst[0]
        w = int(lst[1])
        l = int(lst[2])
        d = int(lst[3])
        score = 3 * w + d
        A.append((score, -i, name))
    A.sort(reverse=True)

    for a in A:
        score = a[0]
        name = a[2]
        print('{},{}'.format(name, score))
    print()

Compile Error Logs:
You are not authorized to see the message.

Status
Judge: 0/1 Python3 CPU: 00.03 sec Memory: 7624 KB Length: 482 B 2017-05-20 05:47 2017-05-20 05:47
Results for testcases
Case # Verdict CPU Time Memory In Out Case Name
Case #1: : Presentation Error 00.03 sec 7624 KB
< prev | / | next >  
 
Judge Input #  ( | ) Judge Output #  ( | )


Comments
 
 Under Construction.
 
Categories
 
 
Free Tags