Click Here to go back to the homepage.

Odd Gnome Solution:


import java.util.Scanner;
public class Kattis {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int cases = sc.nextInt();
    for (int i = 0; i < cases; i++) {
      int nums = sc.nextInt()-2;
      int prev = sc.nextInt();
      for (int j = 0; j < nums; j++) {
        if(++prev != sc.nextInt()) {
          System.out.println(j + 2);
          sc.nextInt();
        }
      }
    }
  }
}