diff --git a/doormat.py b/doormat.py index 093603d..f31aa40 100644 --- a/doormat.py +++ b/doormat.py @@ -45,9 +45,6 @@ """ -N, M = map(int,raw_input().split()) # More than 6 lines of code will result in 0 score. Blank lines are not counted. -for i in xrange(0,N/2): - print ('.|.'*i).rjust((M-2)/2,'-')+'.|.'+('.|.'*i).ljust((M-2)/2,'-') -print 'WELCOME'.center(M,'-') -for i in reversed(xrange(0,N/2)): - print ('.|.'*i).rjust((M-2)/2,'-')+'.|.'+('.|.'*i).ljust((M-2)/2,'-') +n, m = input().split() +pattern = [('.|.'*(2*i + 1)).center(int(m), '-') for i in range(int(n)//2)] +print('\n'.join(pattern + ['WELCOME'.center(int(m), '-')] + pattern[::-1]))