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.
That's ok
Java Fork
deprecated API
warning by removing java.math.BigDecimalI solved that kata this way. But previous guy made is shortly.))
This is incorrect synchornization.
totalVisits
also must be synchronized on same monitor thatvisit
method, also this rule must be applied tovisitsBy
methodClever!
Or is there a way to do it in java without using math.round or DecimalFormat?
@siebenschlaefer does this mean that this one can't be completed in java until it is fixed? My quest to finish all the 8kyu in java is going down the drain haha
\d is short for [0-9]
https://www.regular-expressions.info/shorthand.html
This comment is hidden because it contains spoiler information about the solution
Not unless the kata explicitly asks you to solve the problem without using this very method.
I could reproduce this issue.
The Java tests use floats for the constants. So the expected value before rounding of
mpgToKPM(4145)
is calculated as1467.35498046875
(instead of1467.35505046589605626650154590606689453125
if doubles were used).@emporio, @AngusJGoldsmith or anyone with write access, please fix this by replacing
in the tests with
But that would really defeat the concept of doing the kata, wouldn't it?
@emporio, I think the solution (in Java) is something along the lines of (where n is a double or float) (n*100)/100.00
Can someone proficient in Java repair this?
In Java random test is wrong rounding
for the input 4145 is result 1467.3550763 and its rounded to 1467.36
But the randomTest expect 1467.35
Loading more items...