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)f = 1;
		if(!a[i])cnt++;
	}


        cout<<cnt<<endl;
        return 0;



}
Copy
Legendary lafi-Odeh
GNU G++17
3 ms
332 KB
Wrong Answer