Skip to main content
added 40 characters in body
Source Link
Grimmy
  • 15.8k
  • 1
  • 36
  • 64

Perl, 37 bytes

pascal.pl:

#!/usr/bin/perl s/\d+/$&+$'/eg,say$_="1 $_"for($a)x<> 

Run with size on STDIN:Try it online!

pascal.pl <<< 9 

Perl, 37 bytes

pascal.pl:

#!/usr/bin/perl s/\d+/$&+$'/eg,say$_="1 $_"for($a)x<> 

Run with size on STDIN:

pascal.pl <<< 9 

Perl, 37 bytes

s/\d+/$&+$'/eg,say$_="1 $_"for($a)x<> 

Try it online!

Pasted the wrong version
Source Link
Ton Hospel
  • 15k
  • 1
  • 23
  • 45

Perl, 3637 bytes

pascal.pl:

#!/usr/bin/perl s/\d+/$&+$'/eg,say$_="$_ 1"forsay$_="1 1..<>$_"for($a)x<> 

Run with size on STDIN:

pascal.pl <<< 9 

Perl, 36 bytes

pascal.pl:

#!/usr/bin/perl s/\d+/$&+$'/eg,say$_="$_ 1"for 1..<> 

Run with size on STDIN:

pascal.pl <<< 9 

Perl, 37 bytes

pascal.pl:

#!/usr/bin/perl s/\d+/$&+$'/eg,say$_="1 $_"for($a)x<> 

Run with size on STDIN:

pascal.pl <<< 9 
Source Link
Ton Hospel
  • 15k
  • 1
  • 23
  • 45

Perl, 36 bytes

pascal.pl:

#!/usr/bin/perl s/\d+/$&+$'/eg,say$_="$_ 1"for 1..<> 

Run with size on STDIN:

pascal.pl <<< 9