HELP in DSA learning series question

can anyone suggest what is mistake in my code,for [this] (CodeChef: Practical coding for everyone) ,question
here,is my submission