SIMILAR CODES GETTING DIFFERENT RESULTS ON CC

I was trying a problem and wrote a code that passed all the custom test results but was marked wrong by CC when I checked for the successful submissions I found was entirely similar.

Wrong one: Solution: 50456161 | CodeChef
Right one: Solution: 50455760 | CodeChef

Please have a look.

Are you sure?

y-=x-0.50;

This should have been

y -= x + 0.50;

instead.

1 Like

Yo, something is wrong with you guys.

This is not true.

y -= x - 0.50
// This is short for y = y - (x - 0.50)
// viz y = y - x + 0.50
// Which is wrong

Even a Primary school student knows it.

1 Like

I get it where I was wrong but a primary school student really😂