virtual hust 2013.6.23 数学杂题基础题目 D - Secret Research
思路:水题。。也是直接判断一下
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
#include <cstring> #include <iostream> #include <algorithm> #include <cmath> #include <cstdio> using namespace std; bool positive(string s) { if(s=="1"||s=="4"||s=="78") return true; return false; } bool negative(string s) { int l=s.size(); if(s[l-1]=='5'&&s[l-2]=='3') return true; return false; } bool failed(string s) { if(s[s.size()-1]=='4'&&s[0]=='9') return true; return false; } bool not_complete(string s) { if(s[0]=='1'&&s[1]=='9'&&s[2]=='0') return true; return false; } void solve(string s) { if(positive(s)) printf("+\n"); else if(negative(s)) printf("-\n"); else if(failed(s)) printf("*\n"); else printf("?\n"); } int main() { int t; scanf("%d",&t); while(t--) { string s; cin>>s; solve(s); } return 0; }