57. Number Staircase

Acceptance — 0 accepted 0 submissions

Easy
Nested LoopsPatterns
No companies listed
Kids learn counting with a number staircase. Row i shows the numbers 1 to i.

Given N, print N rows.

Input Format
A single integer N.

Output Format
Print N lines. Line i contains the numbers 1 to i separated by single spaces.

Constraints
• 1 ≤ N ≤ 30

Example 1

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

Explanation Each row counts from 1 up to its row number.

Example 2

Input
1
Output
1

Explanation Only the number 1.

Example 3

Input
2
Output
1
1 2

Explanation Row 1: 1. Row 2: 1 2.

Acceptance —
Accepted 0
Submissions 0
Auto-save
Saved Ln 1, Col 1
Submit a solution to see its status here.
Input
Expected Output
1 1 2 1 2 3 1 2 3 4
No results yet
Run your code to test it against the sample cases.
Problem List