Created
July 17, 2016 13:25
-
-
Save Jack-Saleem/e9826a1482b0c7eef999e1fec5656411 to your computer and use it in GitHub Desktop.
Codeforces 136A Presents program in java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class Presents | |
{ | |
public static void main(String[] args) | |
{ | |
Scanner z=new Scanner(System.in); | |
int n=z.nextInt(); | |
int[] a=new int[n+1]; | |
for(int i=1;i<n+1;i++) | |
a[i]=z.nextInt(); | |
for(int i=1;i<n+1;i++){ | |
for(int j=1;j<n+1;j++){ | |
if(i==a[j]) | |
System.out.print(j+" "); | |
} | |
} | |
z.close(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment