Skip to main content
deleted 1066 characters in body
Source Link
Giuseppe
  • 28.8k
  • 3
  • 31
  • 105

R, 52 51 50 bytes

cat(gsub(1,"known","1 1s
1 un1s
un1 1s
un1 un1s"))

Try it online!

Surprisingly short substitution and print commands make this an actually competitive R answer in a challenge!

Even if it's super boring. Mildly more interesting now, and with a byte saved thanks to J.Doe!

Saved another byte thanks to this answer, also by J.Doe!

R, 55 bytes

cat(t(outer(x<-c('known','unknown'),x,paste)),sep='s
')

Try it online!

Ports the cartesian product approach I've seen in several answers, but it's probably closest to Peter Taylor's. It's still longer than the "boring" one but it's still pretty close.

R, 55 bytes

credit to plannapus for this one

cat(paste(rep(a<-c("known","unknown"),e=2),a),sep="s
")

Try it online!

Another 55-byter; replicates known,unknown each twice and takes advantage of paste's recycling to get the same result as the outer.

R, 52 51 50 bytes

cat(gsub(1,"known","1 1s
1 un1s
un1 1s
un1 un1s"))

Try it online!

Surprisingly short substitution and print commands make this an actually competitive R answer in a challenge!

Even if it's super boring. Mildly more interesting now, and with a byte saved thanks to J.Doe!

Saved another byte thanks to this answer, also by J.Doe!

R, 55 bytes

cat(t(outer(x<-c('known','unknown'),x,paste)),sep='s
')

Try it online!

Ports the cartesian product approach I've seen in several answers, but it's probably closest to Peter Taylor's. It's still longer than the "boring" one but it's still pretty close.

R, 55 bytes

credit to plannapus for this one

cat(paste(rep(a<-c("known","unknown"),e=2),a),sep="s
")

Try it online!

Another 55-byter; replicates known,unknown each twice and takes advantage of paste's recycling to get the same result as the outer.

R, 52 51 50 bytes

cat(gsub(1,"known","1 1s
1 un1s
un1 1s
un1 un1s"))

Try it online!

Surprisingly short substitution and print commands make this an actually competitive R answer in a challenge!

Even if it's super boring. Mildly more interesting now, and with a byte saved thanks to J.Doe!

Saved another byte thanks to this answer, also by J.Doe!

added 115 characters in body
Source Link
Giuseppe
  • 28.8k
  • 3
  • 31
  • 105

R, 52 5151 50 bytes

cat(gsub("( |s)"1,"known\\1""known",""1 s1s
1 unsun1s
unun1 s1s
unun1 uns"un1s"))

Try it online!Try it online!

Surprisingly short substitution and print commands make this an actually competitive R answer in a challenge!

Even if it's super boring. Mildly more interesting now, and with a byte saved thanks to J.Doe!

Saved another byte thanks to this answer, also by J.Doe!

R, 55 bytes

cat(t(outer(x<-c('known','unknown'),x,paste)),sep='s
')

Try it online!

Ports the cartesian product approach I've seen in several answers, but it's probably closest to Peter Taylor's. It's still longer than the "boring" one but it's still pretty close.

R, 55 bytes

credit to plannapus for this one

cat(paste(rep(a<-c("known","unknown"),e=2),a),sep="s
")

Try it online!

Another 55-byter; replicates known,unknown each twice and takes advantage of paste's recycling to get the same result as the outer.

R, 52 51 bytes

cat(gsub("( |s)","known\\1"," s
 uns
un s
un uns"))

Try it online!

Surprisingly short substitution and print commands make this an actually competitive R answer in a challenge!

Even if it's super boring. Mildly more interesting now, and with a byte saved thanks to J.Doe!

R, 55 bytes

cat(t(outer(x<-c('known','unknown'),x,paste)),sep='s
')

Try it online!

Ports the cartesian product approach I've seen in several answers, but it's probably closest to Peter Taylor's. It's still longer than the "boring" one but it's still pretty close.

R, 55 bytes

credit to plannapus for this one

cat(paste(rep(a<-c("known","unknown"),e=2),a),sep="s
")

Try it online!

Another 55-byter; replicates known,unknown each twice and takes advantage of paste's recycling to get the same result as the outer.

R, 52 51 50 bytes

cat(gsub(1,"known","1 1s
1 un1s
un1 1s
un1 un1s"))

Try it online!

Surprisingly short substitution and print commands make this an actually competitive R answer in a challenge!

Even if it's super boring. Mildly more interesting now, and with a byte saved thanks to J.Doe!

Saved another byte thanks to this answer, also by J.Doe!

R, 55 bytes

cat(t(outer(x<-c('known','unknown'),x,paste)),sep='s
')

Try it online!

Ports the cartesian product approach I've seen in several answers, but it's probably closest to Peter Taylor's. It's still longer than the "boring" one but it's still pretty close.

R, 55 bytes

credit to plannapus for this one

cat(paste(rep(a<-c("known","unknown"),e=2),a),sep="s
")

Try it online!

Another 55-byter; replicates known,unknown each twice and takes advantage of paste's recycling to get the same result as the outer.

added 147 characters in body
Source Link
Giuseppe
  • 28.8k
  • 3
  • 31
  • 105

R, 5252 51 bytes

cat(gsub("a""( |s)","known""known\\1","a" ass
a unasuns
unaun ass
unaun unas"uns"))

Try it online!Try it online!

Surprisingly short substitution and print commands make this an actually competitive R answer in a challenge!

Even if it's super boring.Even if it's super boring. Mildly more interesting now, and with a byte saved thanks to J.Doe!

R, 55 bytes

cat(t(outer(x<-c('known','unknown'),x,paste)),sep='s
')

Try it online!

Ports the cartesian product approach I've seen in several answers, but it's probably closest to Peter Taylor's. It's still longer than the "boring" one but it's still pretty close.

R, 55 bytes

credit to plannapus for this one

cat(paste(rep(a<-c("known","unknown"),e=2),a),sep="s
")

Try it online!

Another 55-byter; replicates known,unknown each twice and takes advantage of paste's recycling to get the same result as the outer.

R, 52 bytes

cat(gsub("a","known","a as
a unas
una as
una unas"))

Try it online!

Surprisingly short substitution and print commands make this an actually competitive R answer in a challenge!

Even if it's super boring.

R, 55 bytes

cat(t(outer(x<-c('known','unknown'),x,paste)),sep='s
')

Try it online!

Ports the cartesian product approach I've seen in several answers, but it's probably closest to Peter Taylor's. It's still longer than the "boring" one but it's still pretty close.

R, 55 bytes

credit to plannapus for this one

cat(paste(rep(a<-c("known","unknown"),e=2),a),sep="s
")

Try it online!

Another 55-byter; replicates known,unknown each twice and takes advantage of paste's recycling to get the same result as the outer.

R, 52 51 bytes

cat(gsub("( |s)","known\\1"," s
 uns
un s
un uns"))

Try it online!

Surprisingly short substitution and print commands make this an actually competitive R answer in a challenge!

Even if it's super boring. Mildly more interesting now, and with a byte saved thanks to J.Doe!

R, 55 bytes

cat(t(outer(x<-c('known','unknown'),x,paste)),sep='s
')

Try it online!

Ports the cartesian product approach I've seen in several answers, but it's probably closest to Peter Taylor's. It's still longer than the "boring" one but it's still pretty close.

R, 55 bytes

credit to plannapus for this one

cat(paste(rep(a<-c("known","unknown"),e=2),a),sep="s
")

Try it online!

Another 55-byter; replicates known,unknown each twice and takes advantage of paste's recycling to get the same result as the outer.

added 501 characters in body
Source Link
Giuseppe
  • 28.8k
  • 3
  • 31
  • 105
Loading
added 561 characters in body
Source Link
Giuseppe
  • 28.8k
  • 3
  • 31
  • 105
Loading
added 58 characters in body
Source Link
Giuseppe
  • 28.8k
  • 3
  • 31
  • 105
Loading
Source Link
Giuseppe
  • 28.8k
  • 3
  • 31
  • 105
Loading