How does the codechef compiler work exactly

Describe your issue

Below are the screenshot of same codes written differently. One got accepted and other not


Accepted one -

Rejected one -

Additional info

Run this test case on both the solutions

3 1

It is printing -0. So when i save it as an int, -0 gets saved as 0 right? But then I typecasted the ceil value which should have gave be 0 as output. But even this didn’t get accepted