Skip to main content
Tuesday (24.11.2026) at 20:00: ALGOR Contest: Round #4 (Special Challenge) starts!

~/algor $ cat problems/for-floyd-uchburchagi

Floyd's triangle

Medium 1000 ms 64 MB 47%
Share

A positive integer $N$ is given. Print Floyd's triangle of consecutive positive integers starting from $1$ in $N$ lines: line $1$ has $1$ number, line $2$ has $2$ numbers, ..., line $N$ has $N$ numbers.

The rows of Floyd's number triangle

Input

One positive integer $N$.

Output

$N$ lines, each with the corresponding number of numbers separated by spaces.

Note

$1 \le N \le 30$

Examples

Input #1
4
Output #1
1
2 3
4 5 6
7 8 9 10
Input #2
2
Output #2
1
2 3

Sign in to submit a solution

Signing up is free and takes a minute.