sigfpe error on codechef ide but not on codeblocks(gcc 5)

I was trying to solve a problem & got SIGFPE error ,but there is error on compiling on codechef ide
but no error on codeblocks which uses a little older version of gcc(5.something)
code

#include <iostream>
using namespace std;

int main() {
int t;
cin>>t;
int n[t],v1[t],v2[t];float a,b;
for(int i=0;i<t;i++)
{
    cin>>n[i]>>v1[i]>>v2[i];
    a=2*n[i]/v1[i]; b=1.414213*n[i]/v2[i];
    if(a>b)  cout<<"Elevator";
    else cout<<"Stairs";
}
return 0;
}

don’t ask a problem of an ongoing contest.