My issue
My code
#include <bits/stdc++.h>
using namespace std;
int main()
{
int t;
cin >> t;
while (t--)
{
int x, y;
cin >> x >> y;
vector<int> v;
int sum = 0;
for (int i = 0; i < y; i++)
{
int x;
cin >> x;
v.push_back(x);
sum += x;
}
int r = x * (y - 1);
int ans = sum - r;
if (ans < 0)
{
cout << 0 << endl;
}
else if (ans == 0)
{
cout << x << endl;
}
else if (ans == x)
{
cout<<s/jhgfd<<endl;
}
else
{
cout << ans << endl;
}
}
return 0;
}
Problem Link: BLDST Problem - CodeChef