Skip to content

Instantly share code, notes, and snippets.

@libert-xyz
Created August 1, 2016 16:32
Show Gist options
  • Save libert-xyz/860a538ee5fa4884fa3fba533014a336 to your computer and use it in GitHub Desktop.
Save libert-xyz/860a538ee5fa4884fa3fba533014a336 to your computer and use it in GitHub Desktop.
A single line containing the space separated values of N and M.
#08/1/16
#https://www.hackerrank.com/challenges/designer-door-mat
N, M = map(int,input().split()) # More than 6 lines of code will result in 0 score. Blank lines are not counted.
for i in range(1,N,2):
print ((i*".|.").center(M,"-"))
print ("WELCOME".center(M,"-"))
for i in range(N-2,-1,-2):
print ((i*".|.").center(M,"-"))
@libert-xyz
Copy link
Author

Size: 11 x 33
---------------.|.---------------
------------.|..|..|.------------
---------.|..|..|..|..|.---------
------.|..|..|..|..|..|..|.------
---.|..|..|..|..|..|..|..|..|.---
-------------WELCOME-------------
---.|..|..|..|..|..|..|..|..|.---
------.|..|..|..|..|..|..|.------
---------.|..|..|..|..|.---------
------------.|..|..|.------------
---------------.|.---------------

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment