SIGFPE error

Can anyone please debug my code??? It was showing sigfpe error.

#include

using namespace std;

#define ll long long int

int main()

{

short int t;

/*cout<<"enter the no of test cases :";*/

cin>>t;

while(t != 0)

{

    int n,k;

    ll q[n-1],sum=0;

    cin>>k>>n;

    for(int i=0 ; i<n ; i++)

    {  

     cin>>q[i];

    }

    for(int l=0;l<n;l++)

    {

        sum=sum+q[l];

    }

    ll rmndr = (sum % k) ,qtnt = (sum / k);        

    cout<<"the first day during which chef gets free time is "<<qtnt+1<<endl;

    t--;

}

return 0;

}

What is the constraint for K?

bro why are you print "the first day during which chef gets free time is " ?
print only integer