fork(1) download
  1. import java.util.*;
  2. import java.lang.*;
  3. import java.io.*;
  4.  
  5. class Main
  6. {
  7. public static void main (String[] args) throws java.lang.Exception
  8. {
  9. Scanner in = new Scanner(System.in);
  10. int n = in.nextInt();
  11. double[] x = new double[n];
  12. for (int i = 0; i < n; i++) {
  13. x[i] = in.nextDouble();
  14. }
  15. boolean checker = false;
  16. for (int i = 0; i < n; i++) {
  17. if (x[i] <= 2.5 && checker == false) {
  18. System.out.print(i + 1 + " ");
  19. System.out.printf("%.2f", x[i]);
  20. checker = true;
  21. }
  22. }
  23. if (checker == false) {
  24. System.out.println("Not Found");
  25. }
  26. }
  27. }
Success #stdin #stdout 0.08s 2184192KB
stdin
5
6 7.5 2.1 2.0 0
stdout
3 2.10