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=int(input())print('\n'.join([((2*k+1)*'H').center(2*n-1)forkinrange(n)]))print('\n'.join([((n-1)//2)*' '+ (n*'H') + 3*n*' '+(n*'H') for k in range(n+1)]))print('\n'.join([(((n-1)//2)*' '+(5*n)*'H') for k in range((n+1)//2)]))print('\n'.join([((n-1)//2)*' '+ (n*'H') + 3*n*' '+(n*'H') for k in range(n+1)]))print('\n'.join([((2*n-2*k-1)*'H').center(2*n-1).rjust(6*n-1)forkinrange(n)]))
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Text Alignment
You are viewing a single comment's thread. Return to all comments →