You are given a sequence of positive integers *a*<sub class="lower-index">1</sub>, *a*<sub class="lower-index">2</sub>, ..., *a*<sub class="lower-index">*n*</sub>. Find all such indices *i*, that the *i*-th element equals the arithmetic mean of all other elements (that is all elements except for this one).
The first line contains the integer *n* (2 ≤ *n* ≤ 2·10<sup class="upper-index">5</sup>). The second line contains elements of the sequence *a*<sub class="lower-index">1</sub>, *a*<sub class="lower-index">2</sub>, ..., *a*<sub class="lower-index">*n*</sub> (1 ≤ *a*<sub class="lower-index">*i*</sub> ≤ 1000). All the elements are positive integers.
5
1 2 3 4 5
1
3 
4
50 50 50 50
4
1 2 3 4 
3
2 3 1
1
1 
2
4 2
0
2
1 1
2
1 2 
10
3 3 3 3 3 4 3 3 3 2
8
1 2 3 4 5 7 8 9 
10
15 7 10 7 7 7 4 4 7 2
5
2 4 5 6 9 
6
2 2 2 2 2 2
6
1 2 3 4 5 6 
6
3 3 3 3 3 3
6
1 2 3 4 5 6 
4
6 6 6 7
0
2
1 2
0
3
3 3 4
0
5
7 6 6 6 6
0
4
3 5 5 9
0
3
99 100 99
0
4
5 6 5 5
0
6
1 1 2 1 1 1
0
2
4 5
0
4
1 1 1 2
0
3
1 2 4
0
6
1 1 2 3 3 3
0
4
4 5 5 4
0
3
2 3 5
0
3
2 1 1
0
3
1 1 2
0
4
1 2 3 4
0
5
1 2 3 4 6
0
3
2 2 3
0
4
3 4 5 1
0
3
2 3 2
0
3
3 4 4
0
3
10 5 7
0
3
5 6 5
0
4
1 2 3 7
0
5
2 2 3 3 3
0
3
4 3 6
0
3
1 1 3
0
15
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
15
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 
wrong answer I'm sorry, but I'm not sure what you are asking. If you have any question or need any assistance, feel free to ask and I'll do my best to help you.
