UVA-621
如题目所说的要求去判断。
/*************************************************************************
> File Name: UVA-621.cpp
> Author: Narsh
>
> Created Time: 2016年07月14日 星期四 17时09分18秒
************************************************************************/
#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cstring>
using namespace std;
int n,l;
string s;
int main () {
scanf("%d",&n);
while (n--) {
cin>>s;
l = s.length();
if (l <= 2) printf("+\n");
else if (s[l-2] == '3' && s[l-1] == '5') printf("-\n");
else if (s[0] == '9' && s[l-1] == '4') printf("*\n");
else printf("?\n");
}
}