2081 手机短号
1 #include2 #include 3 4 5 int main(){ 6 int i,n; 7 char s[20]; 8 while(scanf("%d",&n)!=EOF){ 9 getchar();10 while(n--){11 gets(s);12 printf("6");13 for(i=6;i<11;i++){14 if(i==10){printf("%c\n",s[i]);}15 else{printf("%c",s[i]);}16 }17 }18 }19 }
2091 空心三角形
1 #include2 #include 3 4 5 int main(){ 6 char a; 7 int n,i,j,flag=0; 8 while((a=getchar())!='@'){ 9 scanf("%d%*c",&n);10 if(flag!=0){printf("\n");}11 flag++;12 for(i=0;i
1004 Let the Balloon Rise
1 #include2 #include 3 4 5 int main(){ 6 char s[1001][20]; 7 int n,i,j,max,flag,o[1001]; 8 while(scanf("%d",&n)!=EOF){ 9 getchar();10 if(n==0){ break;}11 for(i=0;i max){24 max = o[i];25 flag = i;26 }27 }28 printf("%s\n",s[flag]);29 }30 }
2057 A + B Again
1 #include2 3 int main(){4 _int64 a,b;5 while(scanf("%I64X %I64X",&a,&b)!=EOF){6 if(a+b<0){printf("-%I64X\n",-a-b);}7 else{printf("%I64X\n",a+b);}8 }9 }