본문 바로가기

Programming/BaekJoon

[C++] 백준 10797번 : 10부제


https://www.acmicpc.net/problem/10797




#include <iostream>


using namespace std;

int main() {

int n;

cin >> n;

int ary[5];

for (int i = 0; i < 5; i++) 

cin >> ary[i];

int cnt = 0;

for (int i = 0; i < 5; i++) 

if (ary[i] == n) 

cnt++;

cout << cnt << "\n";

}