repl.it
@anonymous/

ViolentKnottyLing

Ruby

No description

fork
loading
Files
  • main.rb
main.rb
1
2
3
4
5
6
7
8
f=->s{2**(z=0..5).max_by{|j|z.map{|i|s[b="lucky"[i,j]]?b.size: 0}.max}-2*s.count("omen")}

input = "lucky
firetruck
ummm
memes"

input.lines.each {|s| puts f[s]}
ruby 2.5.5p157 (2019-03-15 revision 67260) [x86_64-linux]