Hi everyone,
I'm trying to solve this problem.
But my program gives wrong answer for this test case:
1
3 85
33 7 85
cause of the error is because normally
ceil(( 100.00 / 85.00 ) * 85.00 ) = 100
but my program returns answer as 101.
I guess its because CPP can't find exact result of ( 100 / 85 ) so it returns ( 100.00 / 85.00 ) * 85.00 ) something like 100.000001 and ceil function rounds the number up.
Is there a way to fix this?
Thanks in advance.