개수 세기
2023. 1. 28. 21:33ㆍ개인공부/코딩테스트
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#include <iostream>
using namespace std;
int main()
{
int NumberOfNumber = 0;
cin >> NumberOfNumber;
int Num[201]{};
for (int i = 0; i < NumberOfNumber; ++i)
{
int a = 0;
cin >> a;
++Num[a + 100];
}
int WhatNumber = 0;
cin >> WhatNumber;
cout << Num[WhatNumber + 100];
return 0;
}
|
cs |