ํฐ์คํ ๋ฆฌ ๋ทฐ
๐ฉ๐ป๐ป ๋ฌธ์
โ๐ป ํ์ด
๐จ Go
package main
import (
"bufio"
"fmt"
"os"
)
func main() {
var n, x int
reader := bufio.NewReader(os.Stdin)
writer := bufio.NewWriter(os.Stdout)
fmt.Fscanln(reader, &n, &x)
defer writer.Flush()
var sequence = make([]int, n)
for i := range sequence {
fmt.Fscanf(reader, "%d ", &sequence[i])
if sequence[i] < x {
fmt.Fprintf(writer, "%d ", sequence[i])
}
}
fmt.Fprint(writer, "\n")
}
๐จ Python3
import sys
n, x = map(int, sys.stdin.readline().split())
arr = list(map(int, sys.stdin.readline().split()))
for v in arr:
if v < x:
print(v, end=' ')
print()
728x90
'dev > algorithm' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
BOJ / 10951๋ฒ / A+B - 4 [Go] [Python3] (0) | 2020.04.01 |
---|---|
BOJ / 10952๋ฒ / A+B - 5 [Go] [Python3] (0) | 2020.03.31 |
BOJ / 2439๋ฒ / ๋ณ ์ฐ๊ธฐ - 2 [Go] [Python3] (0) | 2020.03.29 |
BOJ / 2438๋ฒ / ๋ณ ์ฐ๊ธฐ - 1 [Go] [Python3] (0) | 2020.03.28 |
BOJ / 11022๋ฒ / A+B - 8 [Go] [Python3] (0) | 2020.03.27 |
๋๊ธ
๊ธ ๋ณด๊ดํจ
์ต๊ทผ์ ๋ฌ๋ฆฐ ๋๊ธ
TAG
- dfs
- Golang
- ์๊ฐ๊ต์ฒด
- BFS
- ํด์๋งต
- python3
- ํ
- BOJ
- go
- ๋งฅ๋ถํ๋ก
- ballet
- ์ด๋ถํ์
- ๋ฐฑ์ค
- Algorithm
- ํ๋ก์ด๋์์ฌ
- ์๊ณ ๋ฆฌ์ฆ
- baekjoon
- ๋ฐ๋
- ๋งฅ๋ถ ์ ๊ทธ๋ ์ด๋
- ์คํ
- AWS
- dp
- ์๋ฐ
- ๋ชฝ๊ณ ๋๋น
- MongoDB
- ๋ธ๋ฃจํธํฌ์ค
- java
- ๋งฅ๋ถ
- ๋ถํ ์ ๋ณต
- Macbook pro 2012 mid 13
- Total
- Today
- Yesterday