Skip to main content
2 of 3
deleted 2 characters in body
Optimizer
  • 26.6k
  • 7
  • 67
  • 144

PHP 5.5.3, 484

<?php function k($n){$r=array_fill(0,9,'');for($i=0;$i<$n;$i++){$r[0] .= ($i==0)?" __ ":" __ ";$r[1] .= ($i==0)?" / \\":"/ \\";$r[2] .= ($i==0)?"| /\\/":(($i==$n-1)?" /\\ |":" /\\/");$r[3] .= ($i==0)?"| \/ ":(($i==$n-1)?"/\/ |":"/\/ ");$r[4] .= ($i==0)?" \\ ":(($i==$n-1)?"\\/\\ \\/":"\\/\\ ");$r[5] .= ($i==0)?" /\\ ":(($i==$n-1)?"\\/\\ \\":"\\/\\ ");$r[6] = $r[2];$r[7] = $r[3];$r[8] .= ($i==0)? " \__/":"\__/";}foreach($r as $o){if(strlen($o)-2 !== 4*$n)$o.=" ";echo $o."\n";}} 
Med
  • 121
  • 4