You are viewing a single comment's thread. Return to all comments →
JAVA 8:
public static void main(String[] args) { Scanner sc=new Scanner(System.in); int n=sc.nextInt(); int a[]=new int[n]; for(int i=0;i<n;i++) a[i]=sc.nextInt(); for(int i=0;i<n;i++) System.out.println(a[a[i]-1]); }
Seems like cookies are disabled on this browser, please enable them to open this website
Security Permutations
You are viewing a single comment's thread. Return to all comments →
JAVA 8: