dh-winternagi 님의 블로그
(10871) X보다 작은 수 본문
https://www.acmicpc.net/problem/10871
단계별로 풀어보기
4단계(1차원 배열) 2번째
기초 단계라 그런지 배열을 안 써도 되는 문제가 많다.
처음 풀면서 배울 땐 그래도 배열을 썼지만 이젠 그렇게 할 필요가 없기에...

#include <iostream>
using namespace std;
int main()
{
ios::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int n, x;
cin >> n >> x;
while(n--){
int t;
cin >> t;
if(t<x) cout << t << " ";
}
return 0;
}'백준 (C++) > Solve' 카테고리의 다른 글
| (2562) 최댓값 (0) | 2026.04.09 |
|---|---|
| (10818) 최소, 최대 (0) | 2026.04.09 |
| (10807) 개수 세기 (0) | 2026.04.09 |
| (10951) A+B - 4 (0) | 2026.04.09 |
| (10952) A+B - 5 (0) | 2026.04.08 |
