mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-11-10 12:18:48 +00:00
22 lines
314 B
C++
22 lines
314 B
C++
|
#include <iostream>
|
||
|
|
||
|
using std::cin;
|
||
|
using std::cout;
|
||
|
using std::endl;
|
||
|
|
||
|
int t, n, x, s;
|
||
|
|
||
|
int main() {
|
||
|
cin >> t;
|
||
|
while (t--) {
|
||
|
s = 0;
|
||
|
cin >> n;
|
||
|
for (int i = 0; i < n; i++) {
|
||
|
cin >> x;
|
||
|
s += x;
|
||
|
}
|
||
|
cout << !!(s % n) << endl;
|
||
|
}
|
||
|
return 0;
|
||
|
}
|