My issue
i cant understand this problem statement
My code
# cook your dish here
Problem Link: Average Number Practice Coding Problem
i cant understand this problem statement
# cook your dish here
Problem Link: Average Number Practice Coding Problem
@nageswarijampa
here plzz refer the following solution for better understanding
#include <iostream>
using namespace std;
int main() {
// your code goes here
int t;
cin>>t;
while(t--)
{
int n,k,v;
cin>>n>>k>>v;
int a[n];
int sm=0;
for(int i=0;i<n;i++)
{
cin>>a[i];
sm+=a[i];
}
v=v*(n+k);
v-=sm;
if(v%k==0&&v>0)
cout<<v/k;
else
cout<<-1;
cout<<endl;
}
return 0;
}