1234A - Equalize Prices Again
28 Jan 2021 — Tags: None
Click to show code.
using namespace std;
int main(void)
{
int t, n, x, s;
cin >> t;
while (t--)
{
s = 0;
cin >> n;
for (int i = 0; i < n; ++i)
{
cin >> x;
s += x;
}
cout << (int)ceil(s / (n * 1.0)) << endl;
}
}