fork 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. double n;
  10. int size;
  11. boolean checker = false;
  12. Scanner in = new Scanner(System.in);
  13. size = in.nextInt();
  14. for (int i = 0; i < size && checker == false; i++) {
  15. n = in.nextDouble();
  16. if (n <= 2.5) {
  17. System.out.print(i + 1 + " ");
  18. System.out.printf("%.2f", n);
  19. checker = true;
  20. }
  21. }
  22. if(checker == false) {
  23. System.out.println("Not Found");
  24. }
  25. }
  26. }
Success #stdin #stdout 0.08s 2184192KB
stdin
5
6 7.5 2.1 2.0 0
stdout
3 2.10