Back
Close

N-gon Area

Statement
Given the number of sides [[N]] of a regular polygon and the length [[L]] of each side, return the area of this regular polygon, rounded to the closest integer.

Input description
<<Line 1:>> the number [[N]] of sides <<Line 2:>> the length [[L]] of each side

Output description
<<Line 1:>> the area of the regular polygon with [[N]] sides of length [[L]], rounded to the closest integer.

Constraints
3 ≤ [[N]] ≤ 100 0 ≤ [[L]] ≤ 100

Game modes
Shortest

Test cases
Just a square Test
Input
4 1
Output
1

Square validator Validator
Input
4 2
Output
4

Triangle Test
Input
3 3
Output
4

Triangle validator Validator
Input
3 4
Output
7

Octagon Test
Input
8 2
Output
19

Carlosgon Validator
Input
31 2
Output
305

Just a point Test
Input
4 0
Output
0

Point validator Validator
Input
5 0
Output
0

Solution language

Solution

Stub generator input