Login
Immutable PageDiscussionInfoAttachments
rei05/C言語/10027

MMA

   1 #include<stdio.h>
   2 #include<string.h>
   3 int main(){
   4 
   5 int n,i,t=0,h=0;
   6 char tarou[101],hanako[101];
   7 
   8 scanf("%d",&n);
   9 for(i=0;i<n;i++){
  10   scanf("%s %s",tarou,hanako);
  11   if(strcmp(tarou,hanako)>0){
  12     t+=3;
  13   }else if(strcmp(tarou,hanako)<0){
  14     h+=3;
  15   }else{
  16     t+=1;h+=1;
  17   }
  18 }
  19 
  20 printf("%d %d\n",t,h);
  21 
  22 return(0);
  23 }

rei05/C言語/10027 (last edited 2012-05-22 17:40:00 by rei05)