Numeric Triangle 1
0.25s 256MGiven a positive integer \(n\), print a numeric triangle shaped as shown below.
1
22
333
4444
..
nnnnnn...nnn(n copies of n)
That is, there are \(n\) lines in total, and the \(i\)-th line contains \(i\) copies of \(i\).
Input
The input consists of a single line containing a positive integer \(n\) (\(1 \le n \le 9\)).
Output
Output \(n\) lines, where the \(i\)-th line contains \(i\) copies of the digit \(i\).
Sample Input 1
3
Sample Output 1
1
22
333
Log in to write and submit code. Creating an account is free.