Double Factorial
Statement
Goal
You are given a number n, you are to determine its double factorialdouble factorial of a number means the number * (number-2) * (number-4) * .... till 1 or 2 depending on whether it's even or not
Input
Line 1 : A single number n
Output
Line 2 : The Double Factorial Of N, F
Constraints
1 ≤ n ≤ 30
Example
Input
4
Output
8
Game modes
Fastest, Shortest
Test cases
Test 1 Test
Input
4
Output
8
Validator 1 Validator
Input
11
Output
10395
Test 2 Test
Input
2
Output
2
Validator 2 Validator
Input
7
Output
105
Test 3 Test
Input
30
Output
42849873690624000
Validator 3 Validator
Input
3
Output
3
Test 4 Test
Input
1
Output
1
Validator 4 Validator
Input
18
Output
185794560
Test 5 Test
Input
5
Output
15
Validator 5 Validator
Input
9
Output
945
Test 6 Test
Input
6
Output
48
Validator 6 Validator
Input
25
Output
7905853580625
Solution language
Solution
Stub generator input