Good luck in CET-4 everybody!
Time Limit: 1000/1000 MS (Java/others) memory limit: 32768/32768 K (Java/Others)
Total submission (s): 5328 accepted submission (s): 3422
Problem description CET4 is coming soon. Are you reviewing it hard? Maybe even the short term ACM has no time to practice. I know Kiki and Cici. Of course, Kiki and Cici, as contemporary college students infiltrated more than a dozen years in the test room, better understand the relaxation before the test. The so-called "Zhang Chi youdao" means this. No, Kiki and Cici have to play cards for a while before taking a rest every night to relax their nerves.
"Upgrade "? "Double buckle "? "Red Five "? Or "Landlords "?
Of course not! That's cool ~
As a computer school student, Kiki and Cici did not forget their major when playing cards. The rules for playing cards are as follows:
1. A total of N cards;
2. Both parties take turns to capture cards;
3. The number of cards each time can only be a power of 2 (I .e., 1, 2, 4, 8, 16 ...)
4. After the cards are captured, the winning and losing results also come out: the people who have finished the cards are the winners;
Suppose Kiki and Cici are both smart enough (in fact, you don't have to assume that there are unintelligent students ~), In addition, Kiki takes the cards first. Who can win?
Of course, no matter who wins cards are not a problem, it is important that the upcoming CET-4 can have a good state.
Good luck in CET-4 everybody!
The input data contains multiple test cases. Each test case occupies one row and contains an integer N (1 <=n <= 1000 ).
Output if Kiki can win, output "Kiki"; otherwise, output "Cici". The output of each instance occupies one line.
Sample input13
Sample outputkikicici
Authorlcy
Source ACM short term exam_2007/12/13 analysis: SG situation: For any N, if the former (Kiki) is to win, so Kiki must be satisfied in the n-3 position to win ..... push n = 3 * m + 2 ^ X in sequence, that is, N % 3! = 0... code:
1 #include<cstdio>2 int main(){3 int n;4 while(scanf("%d",&n)!=EOF){5 if(n%3)puts("Kiki");6 else puts("Cici");7 }8 return 0;9 }
HDU ---- (1847) Good luck in CET-4 everybody! (Simple ashboard)