DEVSTR - Editorial

please point out the mistake in my code.i’m getting AC for 2 subtasks but not for the third one.here’s the link :[link text][1]CodeChef: Practical coding for everyone