@@ -0,0 +1,685 @@
+package java_problems.easy;%0D%0A%0D%0Aimport java.util.Arrays;%0D%0Aimport java.util.Scanner;%0D%0A%0D%0Apublic class UncleJohny %7B%0D%0A%0D%0A%09public static void main(String%5B%5D args) %7B%0D%0A%09%09%0D%0A%09%09Scanner sc = new Scanner(System.in);%0D%0A%09%09int numCases = Integer.parseInt(sc.nextLine());%0D%0A%09%09for (int i = 0; i %3C numCases; i++) %7B%0D%0A%09%09%09int numSongs = sc.nextInt();%0D%0A%09%09%09int%5B%5D arr = new int%5BnumSongs%5D;%0D%0A%09%09%09for (int j = 0; j %3C arr.length; j++) %7B%0D%0A%09%09%09%09arr%5Bj%5D = sc.nextInt();%0D%0A%09%09%09%7D%0D%0A%09%09%09%0D%0A%09%09%09int johnyPos = sc.nextInt() - 1;%0D%0A%09%09%09int johnySongLength = arr%5BjohnyPos%5D;%0D%0A%09%09%09Arrays.sort(arr);%0D%0A%09%09%09int index = 0;%0D%0A%09%09%09while (arr%5Bindex%5D %3C johnySongLength) %7B%0D%0A%09%09%09%09index++;%0D%0A%09%09%09%7D%0D%0A%09%09%09System.out.println(index + 1);%0D%0A%09%09%7D%0D%0A%09%09sc.close();%0D%0A%09%7D%0D%0A%7D

Add UncleJohny