思路:
0 1 2 3 4 5 6 7 8 9 10 11 12
P N N P N N P N N P N N P
不难发现:当n为三的倍数时,KIKI处于P态
AC代码
#include <cstdio> #include <cmath> #include <algorithm> #include <cstring> #include <utility> #include <string> #include <iostream> #include <map> #include <set> #include <vector> #include <queue> #include <stack> using namespace std; #define eps 1e-10 #define inf 0x3f3f3f3f #define PI pair<int, int> typedef long long LL; const int maxn = 100 + 5; int main() { int n; while(scanf("%d", &n) == 1) { if(n % 3 == 0) printf("Cici\n"); else printf("Kiki\n"); } return 0; }