Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- bool d[1001];
- int main(){
- int n;
- scanf("%d", &n);
- d[0] = true;
- d[1] = false;
- d[2] = true;
- d[3] = false;
- d[4] = true;
- //하나라도 뒤에 애가 이기는 경우의 수 있으면 이기게 됨
- for (int i = 5; i <= 1000; i++){
- d[i] = false;
- if (d[i - 1] == false) d[i] = true;
- if (d[i - 3] == false) d[i] = true;
- if (d[i - 4] == false) d[i] = true;
- }
- if (d[n]) printf("SK\n");
- else printf("CY");
- return 0;
- }
Add Comment
Please, Sign In to add comment