Skip to main content
edited body
Source Link
Todd Lehman
  • 1.8k
  • 14
  • 24

Perl,   69   6261

Updated version (thanks, Dennis!)

$n=<>;for$i(1..$n){say"_".join"",map{$i%$_|$i==_$i%$_|$i==$_?"_"_:$"}2..$n} 

Original version:

$n=<>;for$i(1..$n){say"_".join("",map{$i%$_||$i==$_?"_":" "}(2..$n))} 

Perl,   69   62

Updated version (thanks, Dennis!)

$n=<>;for$i(1..$n){say"_".join"",map{$i%$_|$i==_?"_":$"}2..$n} 

Original version:

$n=<>;for$i(1..$n){say"_".join("",map{$i%$_||$i==$_?"_":" "}(2..$n))} 

Perl,   69   61

Updated version (thanks, Dennis!)

$n=<>;for$i(1..$n){say"_".join"",map{$i%$_|$i==$_?_:$"}2..$n} 

Original version:

$n=<>;for$i(1..$n){say"_".join("",map{$i%$_||$i==$_?"_":" "}(2..$n))} 
added 198 characters in body
Source Link
Todd Lehman
  • 1.8k
  • 14
  • 24

Perl, 69  69   62

Updated version (thanks, Dennis!)

$n=<>;for$i(1..$n){say"_".join"",map{$i%$_|$i==_?"_":$"}2..$n} 

Original version:

$n=<>;for$i(1..$n){say"_".join("",map{$i%$_||$i==$_?"_":" "}(2..$n))} 

Perl, 69

$n=<>;for$i(1..$n){say"_".join("",map{$i%$_||$i==$_?"_":" "}(2..$n))} 

Perl,   69   62

Updated version (thanks, Dennis!)

$n=<>;for$i(1..$n){say"_".join"",map{$i%$_|$i==_?"_":$"}2..$n} 

Original version:

$n=<>;for$i(1..$n){say"_".join("",map{$i%$_||$i==$_?"_":" "}(2..$n))} 
Source Link
Todd Lehman
  • 1.8k
  • 14
  • 24

Perl, 69

$n=<>;for$i(1..$n){say"_".join("",map{$i%$_||$i==$_?"_":" "}(2..$n))}