![[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)
[C++] 백준 4단계 - 10807번 문제자료구조 & 알고리즘/BOJ2023. 3. 28. 00:05
Table of Contents
문제설명
소스코드
#include <iostream>
using namespace std;
int main() {
int arrlength; int num = 0; int input;
cin >> arrlength;
int* arr = new int[arrlength];
for (int i = 0; i < arrlength; ++i) cin >> arr[i];
cin >> input;
for (int i = 0; i < arrlength; ++i) if (input == arr[i]) ++num;
cout << num;
}
'자료구조 & 알고리즘 > BOJ' 카테고리의 다른 글
[C++] 백준 4단계 - 10818번 문제 (0) | 2023.03.29 |
---|---|
[C++] 백준 4단계 - 10871번 문제 (0) | 2023.03.28 |
[C++] 백준 3단계 - 10951번 문제 (1) | 2023.03.28 |
[C++] 백준 3단계 - 10952번 문제 (0) | 2023.03.27 |
[C++] 백준 3단계 - 2439번 문제 (0) | 2023.03.27 |