From 2784afa33b13b17240bb65bac288cad4602738b8 Mon Sep 17 00:00:00 2001 From: Baoshuo Date: Fri, 24 Dec 2021 22:42:48 +0800 Subject: [PATCH] A - Closing The Gap https://codeforces.com/contest/1615/submission/140454599 --- CodeForces/1615/A/A.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 CodeForces/1615/A/A.cpp diff --git a/CodeForces/1615/A/A.cpp b/CodeForces/1615/A/A.cpp new file mode 100644 index 00000000..a8ce812b --- /dev/null +++ b/CodeForces/1615/A/A.cpp @@ -0,0 +1,21 @@ +#include + +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; +}