I’m new to CodeChef and to Competitive programming. I’m trying to solve this question as a practice in the DSA learner series.
This is my solution
https://www.codechef.com/viewsolution/33328938
And this is somebody else
https://www.codechef.com/viewsolution/33328950
For n=1, your program will print count twice
2 Likes
ssjgz
3
They’re both your solutions 
Anyway, they give different output for the following test input:
1
1
5
2 Likes
See for n=1 what are you printing
1 Like
Thanks you guys for this fast reply and I’m so sorry for posting this lame question without checking my code…
1 Like