CodeForces-April Fools Day Contest 2013 - A

April Fools Day Contest 2013 - A . Mysterious Strings

这是CodeForces上很神奇的一道题,我一直搞不懂这题是怎么A的。

 

题目:

Input

The input contains a single integer a (1<=a<=40)

 

Output

Output a single string

 

这就没了。。。。。

 

 

 

AC代码:

#include<string>
#include<iostream>
using namespace std;
const string a[]={"Washington","Adams","Jefferson","Madison","Monroe","Adams","Jackson","Van Buren","Harrison","Tyler",
"Polk","Taylor","Fillmore","Pierce","Buchanan","Lincoln","Johnson","Grant","Hayes","Garfield","Arthur",
"Cleveland","Harrison","Cleveland","McKinley","Roosevelt","Taft","Wilson","Harding","Coolidge","Hoover","Roosevelt",
"Truman","Eisenhower","Kennedy","Johnson","Nixon","Ford","Carter","Reagan","Bush","Clinton","Bush","Obama"};
int main(){
	int x;
	cin>>x;
	cout<<a[x-1]<<endl;
	return 0;
}


 

 哪位大神看懂了评论一下吧!!求解啊!

你可能感兴趣的:(CodeForces-April Fools Day Contest 2013 - A)