My issue
runtime error
My code
#include <bits/stdc++.h>
using namespace std;
int main() {
// your code goes here
int T;
cin>>T;
int mini=INT_MAX;
while(T--){
int N,K;
cin>>N>>K;
vector<int> A;
for(int i=0;i<N;i++){
cin>>A[i];
}
for(int i=0;i<N;i++){
int a=A[i]%K;
mini=min(mini,a);
}
}
cout<<mini;
}
Problem Link: Cookie Day Practice Coding Problem - CodeChef