fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class Ideone
  9. {
  10. public static void main (String[] args) throws java.lang.Exception
  11. {
  12. System.out.println("At 8" + testIt(-8));
  13. System.out.println("At 16" + testIt(-16));
  14. System.out.println("At 32" + testIt(-32));
  15. System.out.println("At 64" + testIt(-64));
  16. System.out.println("At 72" + testIt(-72));
  17. System.out.println("At 80" + testIt(-80));
  18. System.out.println("At 90" + testIt(-90));
  19.  
  20. }
  21.  
  22. public static char testIt(double lat)
  23. {
  24. return "CCCDEFGHJKLMNPQRSTUVWXXX".charAt((int)(Math.ceil((lat + 90)/ 8)));
  25. }
  26. }
Success #stdin #stdout 0.12s 320576KB
stdin
Standard input is empty
stdout
At 8M
At 16L
At 32J
At 64E
At 72D
At 80C
At 90C