#include "stdio.h"
int main() {
int n, len;
char in[10010];
scanf("%d",&n);
while(n--) {
scanf("%s",in);
if (!strcmp(in,"1") || !strcmp(in,"4") || !strcmp(in,"78"))
printf("+");
else {
len=strlen(in);
if (in[len-2]=='3' && in[len-1]=='5') printf("-");
else if (in[0]=='9' && in[len-1]=='4') printf("*");
else if (in[0]=='1' && in[1]=='9' && in[2]=='0') printf("?");
}
printf("\n");
}
return 0;
}
Thursday, September 02, 2010
[UVa] 621 - Secret Research
After getting used to so many critical problems in UVa, you simply can't take this so simply while it is one of the silliest problems. Even the exception condition doesn't really needs a care.
Subscribe to:
Post Comments (Atom)
Connect Rapoo MT750S with Linux (Tested on Manjaro)
I bought this obvious copy of MX Master 2S in hopes of having the device switching functionality along with a lightweight body because I ha...
-
I like coding a lot, keeps me glued to the PC for hours. For that reason it's a need to edit the Syntax Highlighter to suit my eyes for...
-
I bought this obvious copy of MX Master 2S in hopes of having the device switching functionality along with a lightweight body because I ha...
-
Install MinGW GCC Port on Windows. 1. Just go to this address [ http://sourceforge.net/projects/mingw/files/Installer/mingw-get-inst/ ]...
No comments:
Post a Comment
Post your comment here. If you want to say something about programming problems, scripts, software etc, please try to be as descriptive as possible.