时间限制:1 Sec
内存限制:128 MiB
提交:62
答案正确:40
Radical has an array , he wants the array to have as many equal numbers as possible.
He can performs the following operation as many times as he wants:
1.he chooses two elements of the array a[i] , a[j] (i!=j).
2.he simultaneously increases number a[i] by 1 and decreases number a[j] by 1
Now he want to know what maximum number of equal array elements he can get if he performs an arbitary number of such operation.
The first line contains integer n (1 ≤ n ≤ 105) — the array size. The second line contains space-separated integers a1, a2, ..., an (ai ≤ 100000) — the original array.
Print a single integer — the maximum number of equal array elements Radical can get if he performs an arbitrary number of the given operation.
2 2 3 3 2 4 3
1 3
NBUT