fork(1) 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. Scanner sc = new Scanner(System.in);
  13.  
  14. int N = sc.nextInt();
  15. int arr[] = new int[N];
  16.  
  17. for(int i = 0; i<N; i++){
  18. arr[i] = sc.nextInt();
  19. }
  20.  
  21. for(int val : arr)
  22. System.out.print(val + " ");
  23.  
  24. sc.close();
  25. }
  26. }
Success #stdin #stdout 0.18s 58928KB
stdin
5
1 2 3 4 5
stdout
1 2 3 4 5