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