Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save nischalkumar/bd6adc4b4f658f7e29f7e847d886cf30 to your computer and use it in GitHub Desktop.
Save nischalkumar/bd6adc4b4f658f7e29f7e847d886cf30 to your computer and use it in GitHub Desktop.
Reader.init(System.in);
int t = Reader.nextInt();
while(t > 0) {
int n, k;
n = Reader.nextInt();
k= Reader.nextInt();
int ar[]=new int[n];
int sum=0;
for (int i = 0; i < n; i++) {
ar[i]=Reader.nextInt();
}
for(int i = 0; i<n; i++) {
if(ar[i]<=k) {
sum++;
}
}
System.out.println(sum);
t--;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment