Is there any runtime error???

#include
using namespace std;
int main()
{
int t;
cin>>t;
int a;
for(int i=0;i<t;++i)
{
cin>>a;
a=a/2+1;
cout<<a<<endl;
}
return 1;

}
it runs on other compilers but on chef compiler it just shows runtime error
and i dont find any
- divide by zero (not in my case)
- and memory limit exceds ( memory limit 5000 bytes)

It is because of return 1;

You should do : return 0;

It is because non-zero value signify abnormal termination .

** Link for some reference : ** https://stackoverflow.com/questions/204476/what-should-main-return-in-c-and-c