Skip to content

Instantly share code, notes, and snippets.

@Jack-Saleem
Created July 17, 2016 13:25
Show Gist options
  • Save Jack-Saleem/e9826a1482b0c7eef999e1fec5656411 to your computer and use it in GitHub Desktop.
Save Jack-Saleem/e9826a1482b0c7eef999e1fec5656411 to your computer and use it in GitHub Desktop.
Codeforces 136A Presents program in java
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