https://www.codewars.com/kata/5748838ce2fab90b86001b1a
Codewars - Achieve mastery through coding practice and developer mentorship
A coding practice website for all programming levels – Join a community of over 3 million developers and improve your coding skills in over 55 programming languages!
www.codewars.com
DESCRIPTION:
Complete the function that calculates the area of the red square, when the length of the circular arc A is given as the input. Return the result rounded to two decimals.

Note: use the π value provided in your language (Math::PI, M_PI, math.pi, etc)
코드
function squareArea(A){
return (A * 2 / Math.PI) ** 2;
}
'알고리즘 > Codewars' 카테고리의 다른 글
[Codewars] Student's Final Grade (8 kyu) / JavaScript (0) | 2023.04.13 |
---|---|
[Codewars] Cat years, Dog years (8 kyu) / JavaScript (0) | 2023.04.12 |
[Codewars] Correct the mistakes of the character recognition software (8 kyu) / JavaScript (0) | 2023.04.11 |
[Codewars] Meeting (6 kyu) / JavaScript (0) | 2023.04.11 |
[Codewars] Return the day (8 kyu) / JavaScript (0) | 2023.04.10 |
댓글