#include <stdio.h> int main() { int n = 0,x = 0,cnt =0; int arr[100]={0}; scanf("%d\n",&n); for(int i = 0;i<n;++i) scanf("%d ",&arr[i]); scanf("%d\n",&x); int j = 0; while(n--) { if(x==arr[j++]) cnt++; } printf("%d\n",cnt); return 0; }
#include <stdio.h> int main() { int n = 0,x = 0,cnt =0; int arr[100]={0}; scanf("%d\n",&n); for(int i = 0;i<n;++i) scanf("%d ",&arr[i]); scanf("%d\n",&x); int j = 0; while(n--) { if(x==arr[j++]) cnt++; } printf("%d\n",cnt); return 0; }