NaveeezZ's blog

By NaveeezZ, history, 7 weeks ago, In English

Hey everyone :) .

I was solving this Problem , when i came across an issue with the ceil function.

Using the inbuilt ceil func:

WA on test 108

Using manually written Ceil func:


Can someone tell me the reason behind this?

  • Vote: I like it
  • 0
  • Vote: I do not like it

7 weeks ago, # |
  Vote: I like it +1 Vote: I do not like it

64-bit floating point variables can only store 53-bit integers without precision loss and this is not always enough. Also you can implement your intceil function as (x + y - 1) / y.