ํฐ์คํ ๋ฆฌ ๋ทฐ
๐ฉ๐ป๐ป ๋ฌธ์
โ๐ป ํ์ด
๐จ Go
package main
import (
"bufio"
"fmt"
"os"
)
func main() {
var x, y int
reader := bufio.NewReader(os.Stdin)
fmt.Fscanln(reader, &x)
fmt.Fscanln(reader, &y)
if x > 0 {
if y > 0 {
fmt.Println(1)
} else {
fmt.Println(4)
}
} else {
if y > 0 {
fmt.Println(2)
} else {
fmt.Println(3)
}
}
}
๐จ Python3
import sys
x = int(sys.stdin.readline())
y = int(sys.stdin.readline())
if x > 0:
if y > 0:
print(1)
else:
print(4)
else:
if y > 0:
print(2)
else:
print(3)
728x90
'dev > algorithm' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
BOJ / 2438๋ฒ / ๋ณ ์ฐ๊ธฐ - 1 [Go] [Python3] (0) | 2020.03.28 |
---|---|
BOJ / 11022๋ฒ / A+B - 8 [Go] [Python3] (0) | 2020.03.27 |
BOJ / 11021๋ฒ / A+B - 7 [Go] [Python3] (0) | 2020.03.25 |
BOJ / 2742๋ฒ / ๊ธฐ์ฐ N [Go] [Python3] (0) | 2020.03.24 |
BOJ / 2741๋ฒ / N ์ฐ๊ธฐ [Go] [Python3] (0) | 2020.03.23 |
๋๊ธ
๊ธ ๋ณด๊ดํจ
์ต๊ทผ์ ๋ฌ๋ฆฐ ๋๊ธ
TAG
- MongoDB
- ๋งฅ๋ถ
- AWS
- ํ๋ก์ด๋์์ฌ
- java
- ๋ชฝ๊ณ ๋๋น
- python3
- BFS
- Golang
- ์๊ฐ๊ต์ฒด
- ์๊ณ ๋ฆฌ์ฆ
- ๋ถํ ์ ๋ณต
- ํ
- ์๋ฐ
- ballet
- ๋ธ๋ฃจํธํฌ์ค
- Macbook pro 2012 mid 13
- BOJ
- ๋ฐฑ์ค
- ์ด๋ถํ์
- baekjoon
- ํด์๋งต
- Algorithm
- go
- ์คํ
- dp
- ๋ฐ๋
- ๋งฅ๋ถํ๋ก
- ๋งฅ๋ถ ์ ๊ทธ๋ ์ด๋
- dfs
- Total
- Today
- Yesterday