HELP in DSA learning series question

can anyone suggest what is mistake in my code,for [this] (https://www.codechef.com/LRNDSA08/problems/ACM14KG3) ,question
here,is my submission