Created
July 11, 2018 14:51
-
-
Save nischalkumar/bd6adc4b4f658f7e29f7e847d886cf30 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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