Advertisement
Guest User

Untitled

a guest
Nov 21st, 2017
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.38 KB | None | 0 0
  1.  
  2. import java.util.Scanner;
  3. public  class Main {
  4.     public static void main(String[] args) {
  5.         Scanner sc = new Scanner(System.in);
  6.         int N = sc.nextInt();
  7.         int arr[] = new int[N];
  8.         for (int i = 0; i <N ; i++) {
  9.             arr[i]=sc.nextInt();
  10.         }
  11.         for (Integer i:arr) {
  12.             System.out.print(arr[i-1]+" ");
  13.         }
  14.     }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement