+ 8
Code Coach Kaleidoscopes in Java [SOLVED]
There seems to be an issue with one of the hidden tests in Java for this challenge. Four tests work, one doesn't and supposedly this is an easy challenge, but other people complain about it in other languages. As I haven't seen any help on the issue in Java, I have decided to ask for some help here at the forum. Thanks in advance.
4 Antworten
+ 5
That's my best guess, Sandra. The fail is in a hidden test, though. 😕 Thanks for answering! 🙂
+ 2
To anyone who is interested in solving the problem in Java, I had to look around a bit, but problem was solved.
Hint: Instead of using regular double, there is a class in math called BigDecimal that solves rounding precision issues. I had no idea it existed, so I definitely recommend the check! :)
+ 1
There were some rounding issues, maybe your test case hits one of them too...?
+ 1
I have try the BigDecimal class, but still got only one wrong at the 4th case. Then, i am also tried string format, but still got only one wrong at 5th case. Can you show me the code?