Posts by Razetime
Ruby, 75 bytes ->t,u{g=->a{a.reduce{-2*_1+_2}};('%b'%(g[t]+g[u]+(y=43690)^y)).to_i.digits} Try it online! Uses latest ruby features, so tio link will look different. Takes two digit a...
Answer
Sandbox
Compute T-shirt size
Sandbox
Mark my beacons
Ruby, 77 bytes ->x{(2..16).max_by{x.to_s(_1).chars.sum{|y|"".bytes[y.hex]}}} Attempt This Online!
Answer
Ruby, 128 bytes ->x,y{g=->c{c.chars.join" ?"} !x[y]&&(x.match?(/.+#{g[y]}.+/)||(0...(y.size-1)).any?{x[/^#{g[y[0.._1]]}.+#{g[y[(_1+1)..]]}$/]})} Attempt This Online! bookends ar...
Answer
- ← Previous
- 1
- 2
- 3
- 4
- 5
- Next →