0

(Solved)HELP - Shape Code Project

My code don't pass the test case #3, anyone know why? https://code.sololearn.com/cEQyR9BdipZF/?ref=app

16th Jun 2021, 5:51 PM
Érika 👻
Érika 👻 - avatar
2 odpowiedzi
+ 1
Érika 👻 Problem is here: Math.PI * (width * width) You have to first multiply width with Math.PI then multiply result with width because of less precision issue in 3rd test case. So just remove paranthesis ( and ) and write like this: Math.PI * width * width
16th Jun 2021, 6:32 PM
A͢J
A͢J - avatar
0
width*width*Math.PI did not work on #3 either. I learned a×b=b×a !
7th Apr 2022, 11:51 AM
makoto tanaka
makoto tanaka - avatar