Problem list
Log in
#r03208 · Online Judge > GoldOJ

Number Triangle (Recursive)

Bronze IV 2.0 s 1024 MB

Given $N$, print $N$ lines where line $k$ lists $1, 2, \dots, k$ separated by spaces.

Input

One integer $N$ ($1 \le N \le 30$).

Output

Print the number triangle of height $N$.

Example 1

Input
3
Output
1
1 2
1 2 3

Example 2

Input
5
Output
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5
Source
Online Judge > GoldOJ
Appears in
Not part of a ladder, contest or set yet.
Accepted 0 Submissions 0 Acceptance 0% Solvers 0

Discussion

Threads about this problem. Spoilers are collapsed; wrap hints in ||double bars||.

No discussion yet. Start a thread if something here needs explaining.

Recent submissions Open with filters
Code