jmpark0118 / CODING_TEST_PRACTICE

0 stars 0 forks source link

Practice>Python>Strings>Designer Door Mat #57

Open jmpark0118 opened 4 years ago

jmpark0118 commented 4 years ago

image image

출처 : https://www.hackerrank.com/challenges/designer-door-mat/problem

jmpark0118 commented 4 years ago

if __name__ == '__main__':
    n, m = map(int, input().split())

    for i in range(int((n-1)/2)):
        print('-'*int((m-3*(2*i+1))/2) + '.|.'*(2*i+1) + '-'*int((m-3*(2*i+1))/2))

    print('-'*int((m-7)/2) + 'WELCOME' + '-'*int((m-7)/2))

    for j in range(int((n-1)/2)-1, -1, -1):
        print('-'*int((m-3*(2*j+1))/2) + '.|.'*(2*j+1) + '-'*int((m-3*(2*j+1))/2))