Hdu 1847 Good Luck in CET-4 Everybody! What is the bash game ?? I am not very clear, water ~

Source: Internet
Author: User

Hdu 1847 Good Luck in CET-4 Everybody! What is the bash game ?? I am not very clear, water ~
Good Luck in CET-4 Everybody!Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission (s): 5901 Accepted Submission (s): 3811



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 Input

13

Sample Output
KikiCici

Author lcy first, we can determine that, if we are dealing with the situation 3, the first person will be defeated, and the latter will always be able to take the last stone. What about 3 + 3? And so on. All the multiples of 3 are singular situations. Code:
#include 
 
  int main(){int n ;while(~scanf(%d,&n)){if(n%3 == 0){puts(Cici) ;}else{puts(Kiki) ;}}return 0 ;}
 
 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.