fork(1) download
  1. def u(z):
  2. p=[];P=print;S,N,M,X=' -|\n'
  3. while not p or z:p+=[z%20];z=z//20
  4. E=lambda i:(S+N*4+S)*i+X+((M+S*4+M)*i+X)*2+(S+N*4+S)*i+X;F=N*32+X+M+S*30+M+X+N*32+X;[P(S+N*19+S+X+M+((S*4+M)*4+X+M)*2+N*19+M+X+(M+S*19+M+X)*2+S+N*19+S+X*3)if y<1else P(E(y%5)+F*(y//5)+X*3)for y in p[::-1]]
  5. u(int(input()))
Success #stdin #stdout 0.02s 9984KB
stdin
33
stdout
 ---- 
|    |
|    |
 ---- 




 ----  ----  ---- 
|    ||    ||    |
|    ||    ||    |
 ----  ----  ---- 
--------------------------------
|                              |
--------------------------------
--------------------------------
|                              |
--------------------------------