We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
usingSystem;usingSystem.Collections.Generic;usingSystem.IO;usingSystem.Linq;namespaceSolution{classSolution{staticvoidMain(string[]args){/* Enter your code here. Read input from STDIN. Print output to STDOUT */intt=Convert.ToInt32(Console.ReadLine());string[]str=Console.ReadLine().Split(' ');int[]arr=Array.ConvertAll(str,Int32.Parse);for(inti=1;i<=t;i++){intindex1=Array.IndexOf(arr,i)+1;intindex2=Array.IndexOf(arr,index1)+1;Console.WriteLine(index2);}}}}
Thank you, I hope this helps you to understand this problem clearly.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Sequence Equation
You are viewing a single comment's thread. Return to all comments →
My Solutions
Checkout my Latest Solution - HackerRank Solutions
Solution in C# -
Thank you, I hope this helps you to understand this problem clearly.