南阳125
1 #include<stdio.h> 2 char s[15]; 3 int main() 4 { 5 int n,m,temp,tim,ans; 6 scanf("%d",&n); 7 while(n--) 8 { 9 scanf("%d",&m); 10 getchar(); 11 temp=1; 12 ans=0; 13 while(m--) 14 { 15 scanf("%s",s); 16 if(s[0]=='I') 17 temp*=20; 18 if(s[0]=='O') 19 temp/=20; 20 if(s[0]=='S') 21 { 22 scanf("%d",&tim); 23 ans+=tim*60/temp; 24 } 25 } 26 printf("%d\n",ans); 27 } 28 }