QUALITY - Contest System Quality Assurance Tester

no tags 

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

hide comments
karthik1997: 2015-07-15 06:41:55

you have to add penalities but not subtract them. costed me 3 wa :(

Harshit: 2015-06-13 16:27:29

silly mistakes :(

Samil Vargas: 2013-12-30 23:33:05

i dont use EOF cause sometimes return Compilation Error i recommend to use while(cin >> varible != '\0')

marwan akkad: 2012-06-20 17:24:15

too easy I got AC for the first submission

xxx: 2012-06-12 08:30:37

Some more test cases:
INPUT ->
0 0 1 1 1 1
1 1 1 4 3 2
10 0 20 1 8 1

OUTPUT->
team 1: 1, 1
team 2: 3 , 7203
team 3: 2 , 30

dev2: 2012-06-11 07:09:37

please i need more test cases can anyone help me out ....

Ranker: 2012-06-01 12:31:48

Carefully note that the penalty is 20 min and the time given is in seconds.

Ajay Gupta: 2012-02-04 21:30:57

i need more test cases can anyone help me out pls!!

Ayush Verma: 2012-02-01 15:23:37

use
while((scanf(arguments)!=EOF)

and its 20 mins not 20 secs...the comments regarding this fact were misleading....

Secret: 2012-01-31 18:59:39

got 4 WA bcoz of penality is estimated in seconds :(


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