题目中S代表任意字符串,晕。。
#include <iostream>
#include <sstream>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <string>
#include <vector>
#include <set>
#include <cctype>
#include <algorithm>
#include <cmath>
#include <deque>
#include <map>
using namespace std;
///
#define INF 0xffffff7
#define MAXN 200
///
int main()
{
///
int i, j;
string line;
int n;
cin >> n;
cin.ignore();
while (n--)
{
getline(cin, line);
if (line == "1" || line == "78" || line == "4")
{
cout << '+' << endl;
continue;
}
if (line[line.size() - 1] == '5' && line[line.size() - 2] == '3')
{
cout << '-' << endl;
continue;
}
if (line[0] == '9' && line[line.size() - 1] == '4')
{
cout << '*' << endl;
continue;
}
if (line[0] == '1' && line[1] == '9' && line[2] == '0')
{
cout << '?' << endl;
continue;
}
}
///
return 0;
}