less than 1 minute read

Staircase (Hacker Rank)

Consider a staircase of size :
     #
    ##
   ###
  ####
  Observe that its base and height are both equal to , and the image is drawn using # symbols and spaces. The last line is not preceded by any spaces.

  Write a program that prints a staircase of size .
#!/bin/python3

import sys

n = int(input().strip())
for i in range(1, n+1):
    print(('#'*i).rjust(n))
행운의 77문제 프로젝트
  행운의 77문제 프로젝트는 한 달동안 알고리즘 문제 77개를 푸는 프로젝트입니다.