您的位置:首页 > 其它

Secret Research

2013-08-20 21:21 316 查看
http://acm.hust.edu.cn/vjudge/contest/view.action?cid=29592#problem/D

// File Name: bo_jwolf4.cpp
// Author: rudolf
// Created Time: 2013年08月19日 星期一 08:16:25

#include<vector>
#include<list>
#include<map>
#include<set>
#include<deque>
#include<stack>
#include<bitset>
#include<algorithm>
#include<functional>
#include<numeric>
#include<utility>
#include<sstream>
#include<iostream>
#include<iomanip>
#include<cstdio>
#include<cmath>
#include<cstdlib>
#include<cstring>
#include<ctime>
#include<cstring>
using namespace std;

int main()
{
char str[ 10000 ] ;
int n ;
while( cin >> n )
{
while( n-- )
{
cin >> str ;
if( ( strcmp( str , "1" ) == 0 ) || ( strcmp( str , "4" ) == 0 ) || ( strcmp( str , "78" ) == 0 ) )
cout <<"+" << endl ;
else if( ( str[ strlen( str ) - 2 ] == '3' ) || ( str[ strlen( str ) - 1 ] == '5'  ) )
{
cout << "-" << endl ;
}
else if( ( str[ 0 ] == '9' ) || ( str[ strlen( str ) ] == '4' ) )
{
cout << "*" << endl ;
}
else if(  ( str[ 0 ] == '1' ) || ( str[ 1 ] == '9' ) || ( str[ 2 ] == '0' ) )
{
cout << "?" << endl ;
}
}
}
return 0;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  Math1 of bo_jwolf