getting runtime error in c(sigabrt)

CodeChef: Practical coding for everyone getting runtime error in this question CLFIBD Problem - CodeChef please help