ํฐ์คํ ๋ฆฌ ๋ทฐ
๐ฉ๐ป๐ป ๋ฌธ์
โ๐ป ํ์ด
๐จ Go
// https://www.acmicpc.net/problem/9655
package main
import (
"bufio"
"fmt"
"os"
)
func main() {
reader := bufio.NewReader(os.Stdin)
writer := bufio.NewWriter(os.Stdout)
defer writer.Flush()
var n int
fmt.Fscanln(reader, &n)
fmt.Fprintln(writer, getWinner(n))
}
func getWinner(n int) string {
if n%2 == 0 {
return "CY"
}
return "SK"
}
๐จ Python3
# https://www.acmicpc.net/problem/9655
import sys
def get_winner(n):
if n%2 == 0:
return "CY"
return "SK"
if __name__ == "__main__":
n = int(sys.stdin.readline())
print(get_winner(n))
728x90
'dev > algorithm' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
BOJ / 17626๋ฒ / Four Squares [Go][Python3] (0) | 2021.01.21 |
---|---|
BOJ / 19947๋ฒ / ํฌ์์ ๊ท์ฌ ๋ฐฐ์ฃผํ [Go][Python3] (0) | 2021.01.20 |
BOJ / 13301๋ฒ / ํ์ผ ์ฅ์๋ฌผ [Go][Python3] (0) | 2021.01.18 |
BOJ / 9625๋ฒ / BABBA [Go][Python3] (0) | 2021.01.17 |
BOJ / 14697๋ฒ / ๋ฐฉ ๋ฐฐ์ ํ๊ธฐ [Go][Python3] (0) | 2021.01.16 |
๋๊ธ
๊ธ ๋ณด๊ดํจ
์ต๊ทผ์ ๋ฌ๋ฆฐ ๋๊ธ
TAG
- java
- ๋ชฝ๊ณ ๋๋น
- ๋งฅ๋ถํ๋ก
- ๋ฐฑ์ค
- ์๊ฐ๊ต์ฒด
- ํ
- ๋งฅ๋ถ
- go
- ๋ฐ๋
- ํด์๋งต
- MongoDB
- Golang
- ๋ถํ ์ ๋ณต
- Algorithm
- BOJ
- ์ด๋ถํ์
- ๋งฅ๋ถ ์ ๊ทธ๋ ์ด๋
- Macbook pro 2012 mid 13
- ์๋ฐ
- ํ๋ก์ด๋์์ฌ
- ๋ธ๋ฃจํธํฌ์ค
- python3
- ์๊ณ ๋ฆฌ์ฆ
- ์คํ
- dfs
- baekjoon
- BFS
- AWS
- dp
- ballet
- Total
- Today
- Yesterday