![[C++] 백준 4단계 - 10871번 문제](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdna%2FmA85i%2Fbtr5TnPPNXm%2FAAAAAAAAAAAAAAAAAAAAAAhKsbTmAnhYX8IPU7tfAQXGiAlGPcwwWcmIu7mjpRQK%2Fimg.png%3Fcredential%3DyqXZFxpELC7KVnFOS48ylbz2pIh7yKj8%26expires%3D1756652399%26allow_ip%3D%26allow_referer%3D%26signature%3DnqHiD8%252FD5G0WrtrcNJVqRwO5UKY%253D)
문제설명 소스코드 #include using namespace std; int main() { int N; int X; cin >> N >> X; int* arr = new int[N]; for (int i = 0; i > arr[i]; for (int i = 0; i < N; ++i) if (arr[i] < X) cout
![[C++] 백준 4단계 - 10807번 문제](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdna%2FcnhJ0i%2Fbtr5TqZ5UYI%2FAAAAAAAAAAAAAAAAAAAAAGachrCxAPZ5ODXOGnbN6aXhU3Z2nTxpJsGg5bPXK7fZ%2Fimg.png%3Fcredential%3DyqXZFxpELC7KVnFOS48ylbz2pIh7yKj8%26expires%3D1756652399%26allow_ip%3D%26allow_referer%3D%26signature%3D9d4tbjqupPhfmfy7lAnxnKHuFUg%253D)
문제설명 소스코드 #include using namespace std; int main() { int arrlength; int num = 0; int input; cin >> arrlength; int* arr = new int[arrlength]; for (int i = 0; i > arr[i]; cin >> input; for (int i = 0; i < arrlength; ++i) if (input == arr[i]) ++num; cout
![[C++] 백준 3단계 - 10951번 문제](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdna%2FbpADzg%2Fbtr5Tn3ncD9%2FAAAAAAAAAAAAAAAAAAAAABrkyjuTmSM9lCnw28K1x99Y6ViU7Clwmlqsu9AkvDPD%2Fimg.png%3Fcredential%3DyqXZFxpELC7KVnFOS48ylbz2pIh7yKj8%26expires%3D1756652399%26allow_ip%3D%26allow_referer%3D%26signature%3D3nBwpOpfZV0YSVW%252FS9LhtWXzUus%253D)
문제설명 소스코드 #include using namespace std; int main() { int a, b; while (!(cin >> a >> b).eof()) cout val; cout > a >> b).eof() 방식으로 괄호 안의 cin >> a >> b를 통해 읽은 후 eof상태인지를 검사하는 것이다. 따라서 아래와 같이 소스코드를 작성해야한다. while(!(cin >> a >> b).eof()) { ... } 출처 : https://st-lab.tistory.com/257
![[C++] 백준 3단계 - 10952번 문제](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdna%2FdrFqck%2Fbtr5PFYzNF3%2FAAAAAAAAAAAAAAAAAAAAAHjrl5tWKLIyqgB-McDdHO3Jk0liFTo75UPkqVo8KnNZ%2Fimg.png%3Fcredential%3DyqXZFxpELC7KVnFOS48ylbz2pIh7yKj8%26expires%3D1756652399%26allow_ip%3D%26allow_referer%3D%26signature%3Do86VW4TdK9c4Kv004uXn6mK8T3g%253D)
문제설명 소스코드 #include using namespace std; int main() { int A; int B; while (true) { cin >> A >> B; if (A == 0 && B == 0) break; else cout
![[C++] 백준 3단계 - 2439번 문제](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdna%2FbbOBry%2Fbtr5O9rNrRo%2FAAAAAAAAAAAAAAAAAAAAAMqr7WLaRtC9lLfYrfl-9_0uW9Ga_EQllkMxCkwLBqQt%2Fimg.png%3Fcredential%3DyqXZFxpELC7KVnFOS48ylbz2pIh7yKj8%26expires%3D1756652399%26allow_ip%3D%26allow_referer%3D%26signature%3De3zcCwW%252BRUy6ffWRAufPP2ftxpo%253D)
문제설명 소스코드 코드1 #include using namespace std; int main() { int input; cin >> input; for (int i = 1; i
![[C++] 백준 3단계 - 2438번 문제](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdna%2Fs9W97%2Fbtr6bt9mY9f%2FAAAAAAAAAAAAAAAAAAAAAKpobFOYXasJPDi-FS_h9jJW6c3a_QbTyoTkg3WYJfRq%2Fimg.png%3Fcredential%3DyqXZFxpELC7KVnFOS48ylbz2pIh7yKj8%26expires%3D1756652399%26allow_ip%3D%26allow_referer%3D%26signature%3Dceu6teh3KnxhZXNVGpEkCs38c10%253D)
문제설명 소스코드 #include using namespace std; int main() { int input; cin >> input; for (int i = 1; i
![[C++] 백준 3단계 - 11022번 문제](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdna%2Fn8tjc%2Fbtr5UlR49D2%2FAAAAAAAAAAAAAAAAAAAAAIx6JAySah-xJP83XQmvHRTzLjjPRh-reDrjI_eNrHX6%2Fimg.png%3Fcredential%3DyqXZFxpELC7KVnFOS48ylbz2pIh7yKj8%26expires%3D1756652399%26allow_ip%3D%26allow_referer%3D%26signature%3D0BxZ6YDIBQb%252F58jM2DzQiM4oXZU%253D)
문제설명 소스코드 #include using namespace std; int main() { int input; int A; int B; cin >> input; for (int i = 1; i > A >> B; cout
![[C++] 백준 3단계 - 11021번 문제](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdna%2FrzhL8%2Fbtr5QoorcS5%2FAAAAAAAAAAAAAAAAAAAAAG4qrXuhaNlN8BpsDD7ki0mqTk4er00RNF5_iPB5UkVo%2Fimg.png%3Fcredential%3DyqXZFxpELC7KVnFOS48ylbz2pIh7yKj8%26expires%3D1756652399%26allow_ip%3D%26allow_referer%3D%26signature%3DGl7cX51%252BT3U4a4PgfFl%252BgW9ryQc%253D)
문제설명 소스코드 #include using namespace std; int main() { int input; int A; int B; cin >> input; for (int i = 1; i > A >> B; cout