My issue
My code
#include<iostream>
using namespace std;
int main()
{
int t;
cin>>t;
while(t--)
{
int m;
int n;
cin>>n>>m;
int a[m];
for(int i=0;i<m;i++)
{
cin>>a[i];
}
int res=m*n;
for(int j=0;j<m;j++)
{
res-=a[j];
}
// cout<<res<<endl;
if(res>n)
{
int b=res-n;
cout<<n-b<<endl;
}
else
{
cout<<n-res<<endl;
}
}
}
Problem Link: BLDST Problem - CodeChef