uva621 Secret Research
超级水题
View Code
1 #include<stdio.h> 2 #include<string.h> 3 int main() 4 { 5 int T; 6 char st[202]; 7 scanf("%d",&T); 8 getchar(); 9 while(T--) 10 { 11 gets(st); 12 if(!strcmp(st,"1") || !strcmp(st,"4") || !strcmp(st,"78")) 13 { printf("+\n");continue; } 14 if(st[strlen(st)-1] == '5' && st[strlen(st)-2] == '3') 15 { printf("-\n");continue; } 16 if(st[0] == '9' && st[strlen(st)-1] == '4') 17 { printf("*\n");continue; } 18 if(st[0] == '1' && st[1] == '9' && st[2] == '0') 19 { printf("?\n");continue; } 20 } 21 return 0; 22 }