QUALITY - Contest System Quality Assurance Tester

Write a program to score a small, three-problem programming contest. Each input line contains six space-separated integers representing raw score data. The first three integers are in the range 0 . . . 100000. They represent seconds taken to solve the first, second, and third problems, respec- tively. Zero seconds indicates that a problem has not been solved. The last three integers are in the range 0 . . . 100, representing the attempts taken to solve the first, second, and third problems, respectively. Every failed attempt is penalized with 20 minutes, but only for problems that are eventually solved.

Each output line should begin with the string team, followed by a single space, the input line number, a colon, a single space, the number of solved problems, a comma, a single space, and the total number of seconds including penalties it took for the solved problems.

Input:
0 777 0 4 1 1
1 1 1 1 1 1

Output:
team 1: 1, 777
team 2: 3, 3

Added by:Daniel Gómez Didier
Date:2008-11-18
Time limit:1.710s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ERL JS-RHINO NODEJS PERL6 VB.NET
Resource:2007 U.Nacional - Circuito de Maratones ACIS / REDIS

hide comments
2009-08-24 12:04:34 Paranoid Android
Input is terminated by EOF
2009-08-12 04:43:29 Anirudh
under what conditions should the input stop ?
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.