http://acm.hdu.edu.cn/showproblem.php?pid=1847
#include<cstdio>
#include<iostream>
#include<cstring>
using namespace std;
bool a[1111];
void Init()
{
memset(a , false, sizeof(a));
a[0] = false;
a[1] = true;
a[2] = true;
}
int main()
{
Init();
int m;
while(cin>>m)
{
for(int i = 3;i<= m;i++)
{
int num = 1;
for(int j = 1;num <= i;j++)
{
if(a[i-num] == false)//只要有一步能到达必败点, 该点就为必胜点
{
a[i] = true;
break;
}
num *=2;
}
}
if(a[m] == true)
{
cout<<"Kiki"<<endl;
}
else
{
cout<<"Cici"<<endl;
}
}
}