language: C (gcc-4.3.4)
date: 104 days 7 hours ago
link:
visibility: public
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#include<stdio.h>
int main()
{
    int i,j,n=0;
    
    int t1[2],t2[2],t3[2],a1[2],a2[2],a3[2],ttot[2],atot[2];
    
    while((scanf("%d %d %d %d %d %d",&t1[i],&t2[i],&t3[i],&a1[i],&a2[i],&a3[i]))!= EOF){
                     n++;
    }
                     
    for(i=0;i<n;i++) {
                     ttot[i] = atot[i] = 0;
                     if((t1[i] !=0) ) {
                               
                               ttot[i] = ttot[i] + t1[i];
                               atot[i] = atot[i] + a1[i];
                               while(a1[i] > 1) {
                               ttot[i] = ttot[i] + 1200;
                               a1[i] --;
                               }
                     }
                      if((t2[i] !=0) ) {
                               ttot[i] = ttot[i] + t2[i];
                               atot[i] = atot[i] + a2[i];
                              while(a2[i] > 1) {
                               ttot[i] = ttot[i] + 1200;
                               a2[i] --;
                               }
                     }
                      if((t3[i] !=0) ) {
                               ttot[i] = ttot[i] + t3[i];
                               atot[i] = atot[i] + a3[i];
                               while(a3[i] > 1) {
                               ttot[i] = ttot[i] + 1200;
                               a3[i] --;
                               }
                     }
    }
    for(i=0;i<n;i++){
                     printf("team %d: %d, %d\n",i+1,atot[i],ttot[i]);
    }
    
    system("pause");                 
    return 0;
}