please help me in finding out runtime error (Nzec) in my c code its properly working on code block but not on codechef?

c
nzec
runtime-error

#1

#include<stdio.h>
void main()
{
int a,b[2000],i,j,k,l=0;
//printf(“enter no”);
scanf("%d",&a);
if(a){
//printf(“enter nos”);
for(i=0;i<a;i++)
scanf("%d",&b*);
for(i=0;i<a;i++)
{
for(j=0;j<a;j++)
{
for(k=0;k<a;k++)
{
if(b*<=(b[j]+b[k]) && b[j]<=(b*+b[k]) && b[k]<=(b[j]+b*))
{
if(i!=j && j!=k && k!=i)
l++;}}
}
}
printf("%d",((a)(a-1)(a-2)/6)-(l/6));
}
return 0;
}


#2

Can u please specify for which problem u are asking the question???


#3

@ankit_wagadre:you are declaring your main function as void but you are returning a value(i.e return 0), i think this may be the reason, once try removing return value


#4

use int main


#5

Moreover returning a value from main is not allowed when declared as void.