๐Ÿค– ์•Œ๊ณ ๋ฆฌ์ฆ˜

baekjoon. ๋Œ ๊ฒŒ์ž„

ttoance 2022. 8. 31. 21:48

์—ฌ๊ธฐ ๋ฌธ์ œ์ง‘์—์„œ ๋Œ ๊ฒŒ์ž„ ๋ฌธ์ œ๋ฅผ ํ’€์—ˆ๋‹ค. 

ใ„ด ๋ฌธ์ œ์ง‘ : https://www.acmicpc.net/workbook/view/8708

ใ„ด ๋ฌธ์ œ : https://www.acmicpc.net/problem/9655

 

 

DP๋กœ ์ ‘๊ทผํ•ด์•ผ ํ•˜๋‚˜ ์ƒ๊ฐํ•˜๋ฉด์„œ ํ•˜๋‚˜์”ฉ ํ…Œ์ŠคํŠธ์ผ€์ด์Šค๋ฅผ ์ž‘์„ฑํ–ˆ๋Š”๋ฐ, ํ™€์ˆ˜๋ƒ ์ง์ˆ˜๋ƒ ์ธ์ง€๋งŒ ํŒ๋‹จํ•ด์ฃผ๋ฉด ๋ฌธ์ œ ํ•ด๊ฒฐ. 

1๊ฐœ : ์ƒ๊ทผ
2๊ฐœ : ์ƒ๊ทผ ์ฐฝ์˜
3๊ฐœ : 

- ์ƒ๊ทผ (3)
- ์ƒ๊ทผ ์ฐฝ์˜ ์ƒ๊ทผ

4๊ฐœ : 

- ์ƒ๊ทผ(3) ์ฐฝ์˜
- ์ƒ๊ทผ(1) ์ฐฝ์˜(3)
- ์ƒ๊ทผ ์ฐฝ์˜ ์ƒ๊ทผ ์ฐฝ์˜ 
5๊ฐœ : 

- ์ƒ๊ทผ(3) ์ฐฝ์˜(1) ์ƒ๊ทผ(1)
- ์ƒ๊ทผ(1) ์ฐฝ์˜(3) ์ƒ๊ทผ(1)
- ์ƒ๊ทผ(1) ์ฐฝ์˜(1) ์ƒ๊ทผ(3) 
6๊ฐœ : 

- ์ƒ๊ทผ(3) ์ฐฝ์˜(3)
- ์ƒ๊ทผ(3) ์ฐฝ์˜(1) ์ƒ๊ทผ(1) ์ฐฝ์˜(1)
- ์ƒ๊ทผ(1) ์ฐฝ์˜(3) ์ƒ๊ทผ(1) ์ฐฝ์˜(1) 
- ์ƒ๊ทผ(1) ์ฐฝ์˜(1) ์ƒ๊ทผ(3) ์ฐฝ์˜(1)

 

public class Main {
    
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int N = Integer.valueOf(br.readLine());
        
        String answer = "";
        if (N % 2 == 0) {
            answer = "CY";
        }
        else {
            answer = "SK";
        }
        
        System.out.println(answer);
    }
}
๋ฐ˜์‘ํ˜•