WRONG ANSWER IN LTM40AB (PLEASE HELP ME)

https://www.codechef.com/viewsolution/34944223

PLEASE HELP ME SOLVE THIS

You have to count only if a ≤ x ≤ b But you are directly counting till c. Your code will fail if b<c. Try
1
2 2 4 6

1 Like

Thanks a lot :grinning: :v:

now its correct :v: :grinning:

1 Like