Back
Close

Reverse test

Statement

 Goal

Everybody has encountered this at one point in their lives.
Input
n = size
Output
triangle
2 spaces from the left at the base
Constraints
n <= 5
Example
Input
5
Output
      1
     1 1
    1 2 1
   1 3 3 1
  1 4 6 4 1

Game modes
Reverse

Test cases
Input 5 Test
Input
5
Output
1 1 1 1 2 1 1 3 3 1 1 4 6 4 1

Validator 1 Validator
Input
10
Output
1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 1 6 15 20 15 6 1 1 7 21 35 35 21 7 1 1 8 28 56 70 56 28 8 1 1 9 36 84 126 126 84 36 9 1

Input 2 Test
Input
2
Output
1 1 1

Validator 2 Validator
Input
4
Output
1 1 1 1 2 1 1 3 3 1

Input 3 Test
Input
3
Output
1 1 1 1 2 1

Validator 3 Validator
Input
6
Output
1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1

Input 4 Test
Input
4
Output
1 1 1 1 2 1 1 3 3 1

Validator 4 Validator
Input
4
Output
1 1 1 1 2 1 1 3 3 1

Input 1 Test
Input
1
Output
1

Validator 5 Validator
Input
1
Output
1

Solution language

Solution

Stub generator input