fork download
  1. def g(s,n,j=1):
  2. for W in s.split("\n"):exec"O=p='';d=0\nfor c in W:q=' _'[j*'_'in p+c];e=[n-j,j-1][c=='/'];O+=q*(e+d)+[c,q][c>'^'];p=c;d=n+~e\nprint O;j-=1;"*j;j=n
  3.  
  4. s=""" __
  5. /_/\\
  6. \_\/"""
  7.  
  8. t=""" __
  9. /\_\\
  10. \/_/"""
  11.  
  12.  
  13.  
  14. u=""" ______
  15. /_/_/\_\\
  16. /_/\_\/\_\\
  17. /\_\/_/\/_/\\
  18. \/_/\_\/_/\/
  19. \_\/_/\_\/
  20. \_\_\/_/"""
  21.  
  22.  
  23. for x in s,t,u:
  24. for n in 1,2,3,4:g(x,n)
Success #stdin #stdout #stderr 0.07s 43056KB
stdin
Standard input is empty
stdout
 __
/_/\
\_\/
  ____
 /   /\
/___/  \
\   \  /
 \___\/
   ______
  /     /\
 /     /  \
/_____/    \
\     \    /
 \     \  /
  \_____\/
    ________
   /       /\
  /       /  \
 /       /    \
/_______/      \
\       \      /
 \       \    /
  \       \  /
   \_______\/
 __
/\_\
\/_/
  ____
 /\   \
/  \___\
\  /   /
 \/___/
   ______
  /\     \
 /  \     \
/    \_____\
\    /     /
 \  /     /
  \/_____/
    ________
   /\       \
  /  \       \
 /    \       \
/      \_______\
\      /       /
 \    /       /
  \  /       /
   \/_______/
   ______
  /_/_/\_\
 /_/\_\/\_\
/\_\/_/\/_/\
\/_/\_\/_/\/
 \_\/_/\_\/
  \_\_\/_/
      ____________
     /   /   /\   \
    /___/___/  \___\
   /   /\   \  /\   \
  /___/  \___\/  \___\
 /\   \  /   /\  /   /\
/  \___\/___/  \/___/  \
\  /   /\   \  /   /\  /
 \/___/  \___\/___/  \/
  \   \  /   /\   \  /
   \___\/___/  \___\/
    \   \   \  /   /
     \___\___\/___/
         __________________
        /     /     /\     \
       /     /     /  \     \
      /_____/_____/    \_____\
     /     /\     \    /\     \
    /     /  \     \  /  \     \
   /_____/    \_____\/    \_____\
  /\     \    /     /\    /     /\
 /  \     \  /     /  \  /     /  \
/    \_____\/_____/    \/_____/    \
\    /     /\     \    /     /\    /
 \  /     /  \     \  /     /  \  /
  \/_____/    \_____\/_____/    \/
   \     \    /     /\     \    /
    \     \  /     /  \     \  /
     \_____\/_____/    \_____\/
      \     \     \    /     /
       \     \     \  /     /
        \_____\_____\/_____/
            ________________________
           /       /       /\       \
          /       /       /  \       \
         /       /       /    \       \
        /_______/_______/      \_______\
       /       /\       \      /\       \
      /       /  \       \    /  \       \
     /       /    \       \  /    \       \
    /_______/      \_______\/      \_______\
   /\       \      /       /\      /       /\
  /  \       \    /       /  \    /       /  \
 /    \       \  /       /    \  /       /    \
/      \_______\/_______/      \/_______/      \
\      /       /\       \      /       /\      /
 \    /       /  \       \    /       /  \    /
  \  /       /    \       \  /       /    \  /
   \/_______/      \_______\/_______/      \/
    \       \      /       /\       \      /
     \       \    /       /  \       \    /
      \       \  /       /    \       \  /
       \_______\/_______/      \_______\/
        \       \       \      /       /
         \       \       \    /       /
          \       \       \  /       /
           \_______\_______\/_______/
stderr
Warning: cannot find your CPU L2 cache size in /proc/cpuinfo