RAINBOWA - Editorial

Please either format your code or (better!) link to your submission - the forum software has mangled it and it won’t compile! :slight_smile:

Please help me with this code

Solution: 57067401 | CodeChef

output is yes in VScode IDE as well as CodeChef IDE as custom input. But the Codechef IDE give the wrong answer as I submit the code

The correct output is no.

Can you explain, how?

here is my solution (definitely wrong :sweat_smile:):
https://www.codechef.com/viewsolution/57402093
can anyone point out where my code is failing.