Source Code
#include <bits/stdc++.h>
using namespace std;



int main(){
int n, d;
	scanf("%d%d", &n, &d);
	int a[n];
	bool f = 0;
	int cnt = 0;
	for (int i = 0; i < n; i++) {
		scanf("%d", &a[i]);
		if (a[i] == d)cnt++;
	}

    
        cout<<cnt<<endl;
        return 0;
    

	if (f)puts("1");
	else puts("0");

}
Copy
Legendary lafi-Odeh
GNU G++17
2 ms
692 KB
Wrong Answer