2022 G.W. Coding Contest 1 J3: Find the imposter:

You and 4 other friends are playing a game. Each player says a sequence of 5 numbers in arithmetic progression (meaning each successive number increases by the sum amount. 2,4,6,8,10 is an arithmetic progression). Each player will make a maximum of one mistake. Your program must identify how many mistakes were made.


TIME CONSTRAINT: 1s

Sample Input:

2 4 8 8 10
3 5 7 9 11
100 200 300 400 500
1 9 3 4 5
1 1 1 1 1

Sample Output:

2

Submit Solution

Problem author: Pranav