Skip to content

Instantly share code, notes, and snippets.

@bohyunjung
Last active October 14, 2018 07:49
Show Gist options
  • Save bohyunjung/9fae7d88bd20284b53bd733783723c1f to your computer and use it in GitHub Desktop.
Save bohyunjung/9fae7d88bd20284b53bd733783723c1f to your computer and use it in GitHub Desktop.
pycon 한국 2018 래블업 코드골프 제출 코드
n=int(input())
m=int(input())
l="-"
z=n+2
q=1<<z
for i in range(n):
a=n-i if i>n/2-1 else i+1
b=abs(n-2*i)
b+=(b==0)+a
q^=(1<<a|1<<b)
x=y=""
for j in range(1,z):
x+=" +"if j==a else l*4 if a<j and j<b else l*3+"+" if j==b else" |"
y+=" |"if q&1<<j else" "
print(x*m+'\n'+y*m)
print(((4*i+3)*l+"+ +")*m)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment