Skip to main content
added 868 characters in body
Source Link
Dom Hastings
  • 24.4k
  • 4
  • 56
  • 93

Perl 5, 33 bytes

Disclaimer: I didn't realise that brace expansion was possible within the <...> operator (learned thanks to @Grimy's answer!) and the using the clever expansion trick from @NahuelFouilleul's amazing bash answer, I was able to build this solution. I will happily remove this at either of their request.

print<"{,un}known {,un}knowns$/">

Try it online!


Perl 5, 42 bytes

41 bytes code + 1 for -p.

s//K Ks
K unKs/;s/K/known/g;$\=s/^/un/gmr

Try it online!


Perl 5, 45 bytes

Tried to come up with an alternative, but couldn't make it shorter... Thought it was different enough to warrant adding anyway.

print"un"x/[3467]/,known,$_%2?"s
":$"for 0..7

Try it online!

Perl 5, 42 bytes

41 bytes code + 1 for -p.

s//K Ks
K unKs/;s/K/known/g;$\=s/^/un/gmr

Try it online!


Perl 5, 45 bytes

Tried to come up with an alternative, but couldn't make it shorter... Thought it was different enough to warrant adding anyway.

print"un"x/[3467]/,known,$_%2?"s
":$"for 0..7

Try it online!

Perl 5, 33 bytes

Disclaimer: I didn't realise that brace expansion was possible within the <...> operator (learned thanks to @Grimy's answer!) and the using the clever expansion trick from @NahuelFouilleul's amazing bash answer, I was able to build this solution. I will happily remove this at either of their request.

print<"{,un}known {,un}knowns$/">

Try it online!


Perl 5, 42 bytes

41 bytes code + 1 for -p.

s//K Ks
K unKs/;s/K/known/g;$\=s/^/un/gmr

Try it online!


Perl 5, 45 bytes

Tried to come up with an alternative, but couldn't make it shorter... Thought it was different enough to warrant adding anyway.

print"un"x/[3467]/,known,$_%2?"s
":$"for 0..7

Try it online!

added 403 characters in body
Source Link
Dom Hastings
  • 24.4k
  • 4
  • 56
  • 93

Perl 5, 42 bytes

41 bytes code + 1 for -p.

s//K Ks
K unKs/;s/K/known/g;$\=s/^/un/gmr

Try it online!


Perl 5, 45 bytes

Tried to come up with an alternative, but couldn't make it shorter... Thought it was different enough to warrant adding anyway.

print"un"x/[3467]/,known,$_%2?"s
":$"for 0..7

Try it online!

Perl 5, 42 bytes

41 bytes code + 1 for -p.

s//K Ks
K unKs/;s/K/known/g;$\=s/^/un/gmr

Try it online!

Perl 5, 42 bytes

41 bytes code + 1 for -p.

s//K Ks
K unKs/;s/K/known/g;$\=s/^/un/gmr

Try it online!


Perl 5, 45 bytes

Tried to come up with an alternative, but couldn't make it shorter... Thought it was different enough to warrant adding anyway.

print"un"x/[3467]/,known,$_%2?"s
":$"for 0..7

Try it online!

deleted 3 characters in body
Source Link
Dom Hastings
  • 24.4k
  • 4
  • 56
  • 93

Perl 5, 4342 bytes

4241 bytes code + 1 for -p.

s//K Ks
K unKs/;s/K/known/g;$_.=sg;$\=s/^/un/gmr

Try it online!Try it online!

Perl 5, 43 bytes

42 bytes code + 1 for -p.

s//K Ks
K unKs/;s/K/known/g;$_.=s/^/un/gmr

Try it online!

Perl 5, 42 bytes

41 bytes code + 1 for -p.

s//K Ks
K unKs/;s/K/known/g;$\=s/^/un/gmr

Try it online!

Source Link
Dom Hastings
  • 24.4k
  • 4
  • 56
  • 93
Loading