https://www.acmicpc.net/problem/10871
10871번: X보다 작은 수
첫째 줄에 N과 X가 주어진다. (1 ≤ N, X ≤ 10,000) 둘째 줄에 수열 A를 이루는 정수 N개가 주어진다. 주어지는 정수는 모두 1보다 크거나 같고, 10,000보다 작거나 같은 정수이다.
www.acmicpc.net
import sys
N, X = map(int, sys.stdin.readline().split())
A = map(int, sys.stdin.readline().split())
for i in A:
if i < X:
print(i, end=' ')
else:
continue
'알고리즘 > 백준' 카테고리의 다른 글
[Python] 백준 10951번 - A+B - 4 (0) | 2020.06.09 |
---|---|
[Python] 백준 10952번 - A+B - 5 (0) | 2020.06.09 |
[Python] 백준 2439번 - 별 찍기 - 2 (0) | 2020.06.09 |
[Python] 백준 2438번 - 별 찍기 - 1 (0) | 2020.06.09 |
[Python] 백준 11022번 - A+B - 8 (0) | 2020.06.09 |
댓글