This is my solution
Sorry for sounding like a noob, but can someone help me figure out why my submission was flagged as wrong?
I’ve tried running it on Codechef IDE and other online compilers with all the given constraints listed in the question. The value is printed in the output are correct too.
I want to understand why my solution was marked wrong, so I can correct and avoid it the next time.