ํฐ์คํ ๋ฆฌ ๋ทฐ
๐ฉ๐ป๐ป ๋ฌธ์
โ๐ป ํ์ด
๐จ 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
- dp
- ๋งฅ๋ถ
- ๋ชฝ๊ณ ๋๋น
- go
- baekjoon
- ์คํ
- ๋งฅ๋ถํ๋ก
- ํ๋ก์ด๋์์ฌ
- ์ด๋ถํ์
- ๋ฐ๋
- ๋ถํ ์ ๋ณต
- Golang
- ์๋ฐ
- ์๊ฐ๊ต์ฒด
- BOJ
- python3
- ballet
- BFS
- ํด์๋งต
- ๋งฅ๋ถ ์ ๊ทธ๋ ์ด๋
- dfs
- AWS
- java
- Macbook pro 2012 mid 13
- ๋ธ๋ฃจํธํฌ์ค
- MongoDB
- ๋ฐฑ์ค
- ํ
- Algorithm
- ์๊ณ ๋ฆฌ์ฆ
- Total
- Today
- Yesterday