Created
August 24, 2018 13:49
-
-
Save leehosung/54fba9ee8fcdad4e7a744b05ea4efd33 to your computer and use it in GitHub Desktop.
PyCon Korea 2017 Code Golf2
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
r,t,c=range,'*',int(input()) | |
s=[int(input()) for _ in r(c)] | |
a=max(s) | |
m=[[' ']*a for j in r(a)] | |
for n in s: | |
x=a//2-n//2 | |
b=n//2 | |
for i in r(b+1):z=i+x;u=x-i;m[b+z][z]=t;m[b+u][z]=t;m[b+z][n-1+u]=t;m[b+u][n-1+u]=t | |
for l in m:print(''.join(l)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment