My solution gives compiler error, though it perfectly runs on GCC compiler
Here’s my code
#include<stdio.h>
int main()
{
int t, ans = 0, maxi = 0,n;
scanf(“%d”,&t);
while(t–)
{
scanf(“%d”,&n);
maxi = 0;
ans = 0;
int a[n][3];
for(int i=0;i<n;i++)
{
for(int j=0;j<3;j++)
{
scanf(“%d”,&a[i][j]);
}
}
for(int i=0;i<n;i++)
{
ans = (a[i][1]/(a[i][0]+1))*a[i][1];
if(ans > maxi)
{
maxi = ans;
}
}
printf(“%d\n”,maxi);
}
}