fork download
  1. # http://c...content-available-to-author-only...e.com/a/59889/34718
  2.  
  3. n=input()
  4. d=raw_input()
  5. r=range(n)
  6. r+=r[n-2::-1]
  7. #if'r'>d:r=[~x+n for x in r];for i in r:print"*".rjust(i+1," ")
  8. for i in[r,[~x+n for x in r]]['r'>d]:print"*".rjust(i+1," ")
Success #stdin #stdout 0.01s 9016KB
stdin
5
l
stdout
    *
   *
  *
 *
*
 *
  *
   *
    *