0

Kaleidoscopes~Code Coach) 1 of the hidden test cases failed!! Please tell me what went wrong.

https://www.sololearn.com/coach/44?ref=app

23rd May 2020, 3:22 PM
Rinsha P
3 Answers
+ 1
Could you add a link to the Code coach? Is this the one with the Hannukah candles?
23rd May 2020, 4:09 PM
Kuba SiekierzyƄski
Kuba SiekierzyƄski - avatar
+ 1
You are taking input a int value into double, if input is in double type, then use nextDouble().. For double, format specifier is %lf. And output statement is System.out.printf("%.2lf",res); format is in string class.. String.format("%.2lf",res);
23rd May 2020, 8:30 PM
Jayakrishna 🇼🇳
0
I think the problem in java will be the output. I would prefer i.e.; DecimalFormat fo = new DecimalFormat("#.##"); System.out.print(fo.format(res));
23rd May 2020, 4:54 PM
JaScript
JaScript - avatar