Created
August 24, 2018 13:47
-
-
Save leehosung/43e41b80ead94c000f4a9912b059d436 to your computer and use it in GitHub Desktop.
PyCon Korea 2017 Code Golf 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
count = int(input()) | |
sizes = [int(input()) for _ in range(count)] | |
map = [] | |
a=max(sizes) | |
for i in range(a): | |
map.append([' ']*a) | |
for n in sizes: | |
x = int(a / 2) - int(n / 2) | |
m = int(n/2) | |
for i in range(m+1): | |
map[m+i+x][i+x] = '*' | |
map[m-i+x][i+x] = '*' | |
map[m+i+x][n-i-1+x] = '*' | |
map[m-i+x][n-i-1+x] = '*' | |
for line in map: | |
print(''.join(line)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment