Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
I will repeat what I said in the post just below.
First I notice that 69 people passed the R tests.
I will try to explain but my explanation is maybe not the best.
Idealy when working with floats one begins by multiplying and not by dividing (you begin with the division..) to avoid multiplying the error caused by computers in divisions.
My explanation:-)
1.92 - 1.47 = 0.44999999999999996... (given by computers)
(1.92 - 1.47) * 3600 = 1619.9999999999998...
((1.92 - 1.47) * 3600) / 20 = 80.9999999999999858 (calculated with R, for example use
formatC(max(v), digits = 16, format = "f")
)Then you take the int or the floor (because police don't want to penalize you:-) you get 80.
In some other languages I used a tolerance of 1 but (sorry for that) not in R.
You don't have "to use floor(round(v, 6))". Simply made the operations in good order (mmultiplication before division) and at the end take the floor; if you do like that you will find 80. I think (but I can be wrong): it is a good example of calculating in a correct way with floats). Cheers!
Fixed the test case in python.
how did you bypass this ? hardcoded ?
-edit-
Sorry, double post.
-edit-
Nevermind, solved.
Also had to bypass the test case. Still not fixed.