#CCBCHBA0000099. Tam giác dấu sao phải (Right-Aligned Star Triangle)
Tam giác dấu sao phải (Right-Aligned Star Triangle)
Right-Aligned Star Triangle
Source: Phước Hưng OJ
Version: Phuoc Hung OJ Extended
Problem Statement
Given , print exactly lines. Line begins with exactly ordinary spaces, followed by exactly consecutive *. Every line has exactly characters counting its leading spaces; no trailing spaces.
Input
One line contains integer .
Output
Print lines, preserving the specified leading spaces.
Subtasks
-
Subtask 1 (20%): .
-
Subtask 2 (30%): .
-
Subtask 3 (50%): .
Examples
Example 1
Input:
4
Output:
*
**
***
****
Explanation:
Row i contains n-i leading spaces followed by i stars. For this sample, the input is 4; the displayed rows follow these rules exactly.
Example 2
Input:
1
Output:
*
Explanation:
Row i contains n-i leading spaces followed by i stars. For this sample, the input is 1; the displayed rows follow these rules exactly.