CodeMentor.
Ask AIProblemsLearnC++TCSCore CSHRProgress
0Lv 1
ProblemsHackerRank Warmup

Staircase

Easy
HackerRank
6/12
EasyHackerRank Warmup

Staircase

For row r from 1 to n, print (n-r) spaces then r hash symbols. Right aligned.

Examples

Example 1

Input

4

Output

   #
  ##
 ###
####

Stuck? Take a nudge

C++17Autosaves