• + 0 comments

    Wow, its crazy to see how yours is so similar yet so different from my code. I instead placed the integer at the index it was going to be at from the very beginning

    public static void main(String[] args) {
            Scanner in = new Scanner(System.in);
            int n = in.nextInt();
            int cycles = in.nextInt();
            int queries = in.nextInt();
            int[] a = new int[n];
            for(int a_i=0; a_i < n; a_i++){
                a[(a_i+cycles) % n] = in.nextInt();
            }
            for(int a0 = 0; a0 < queries; a0++){
                int m = in.nextInt();
                System.out.println(a[m]);
            }
        }