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 Problem
  9. {
  10. public int solution(int[] A) {
  11. return A[0];
  12. // return 3;
  13. }
  14.  
  15. public static int staticSolution(int[] A) {
  16. return A[0];
  17. }
  18.  
  19. public static void main (String[] args) throws java.lang.Exception
  20. {
  21. // your code goes here
  22. // String s;
  23. int[] input = {-1, 1, 3, 3, 3, 2, 3, 2, 1, 0};
  24.  
  25. System.out.println(staticSolution(input));
  26. }
  27. }
Success #stdin #stdout 0.04s 2184192KB
stdin
Standard input is empty
stdout
-1