repl.it
@anonymous/

WastefulBrownNautilus

Ruby

No description

fork
loading
Files
  • main.rb
main.rb
1
2
3
4
5
6
f=->o,x,i=0{y=eval x*o;y>9?f[o,y.to_s.chars,i+1]:[y,i]}

p f[?+,[81,31]]
p f[?+,[351,14568]]
p f[?*,[21,111]]
p f[?*,[136,2356]]
ruby 2.5.5p157 (2019-03-15 revision 67260) [x86_64-linux]
?