UVA 621
#include<iostream> #include<string> using namespace std; int main() { int n; cin>>n; cin.ignore(); while(n--) { string m; getline(cin,m); if(m.compare("78")==0||m.compare("1")==0||m.compare("4")==0) cout<<"+"<<endl; else if(m[m.length()-2]=='3'&&m[m.length()-1]=='5') cout<<"-"<<endl; else if(m[0]=='9'&&m[m.length()-1]=='4') cout<<"*"<<endl; else if(m.substr(0,3).compare("190")==0) cout<<"?"<<endl; } return 0; }