We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
N, M = map(int, input().split(" "))
message = 'WELCOME'
pattern = '.|.'
mid = N//2
for i in range(mid):
print((pattern*((i*2)+1)).center(M, '-'))
print(message.center(M, '-'))
for i in range(mid-1, -1 , -1):
print((pattern*((i*2)+1)).center(M, '-'))
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Designer Door Mat
You are viewing a single comment's thread. Return to all comments →
N, M = map(int, input().split(" "))
message = 'WELCOME'
pattern = '.|.'
mid = N//2
for i in range(mid):
print((pattern*((i*2)+1)).center(M, '-'))
print(message.center(M, '-'))
for i in range(mid-1, -1 , -1):
print((pattern*((i*2)+1)).center(M, '-'))