U E D R , A S I H C RSS

마름모출력/이승한

마름모출력/이승한

~cpp 
limit = input()
for num in range(limit):
    print str(' '*int(limit-num-1))+str('#' * int(num+1))+str('#'*num)
for num in range(limit):
    print str(' '*int(num))+str('#'*int(limit-num))+str('#'*int(limit-num-1))
조금더 간결하게
~cpp 
limit = input()
for num in range(limit):
    print str(' '*(limit-num)) + str('$'*((num+1)*2-1))
for num in range(limit-1):
    print str(' '*(num+2)) + str('$'*((limit-num-1)*2-1))

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:29:23
Processing time 0.0112 sec