[2024][ruby][19.1]

main
Alpha Chen 3 days ago
parent 41ecc75d62
commit 6f46272340
Signed by: alpha
SSH Key Fingerprint: SHA256:3fOT8fiYQG/aK9ntivV3Bqtg8AYQ7q4nV6ZgihOA20g

@ -0,0 +1,18 @@
available, desired = DATA.read.split("\n\n")
available = available.split(", ")
desired = desired.lines(chomp: true)
available = Regexp.new("^(#{available.join(?|)})+$")
pp desired.select { _1 =~ available }.size
__END__
r, wr, b, g, bwu, rb, gb, br
brwrr
bggr
gbbr
rrbgbr
ubwu
bwurrg
brgr
bbrgwb
Loading…
Cancel
Save