Triangles
Painting rectangles is fun, but can you draw a triangle?
Given a single number
n
, you are asked to draw a triangle of height and width of n
that is filled with *
symbols.Input | Output |
1 | * |
2 | *
** |
7 | *
**
***
****
*****
******
******* |
Constraints
Time limit: 2 seconds
Memory limit: 512 MB
Output limit: 1 MB