@anonymous/

SandyGranularBlackpanther

Ruby

No description

fork
loading
Files
  • main.rb
main.rb
1
2
3
4
5
6
(2..10)
  .to_a
  .permutation
  .map { |a, b, c, d, e, f, g, h, i| ["#{a}#{b}#{c}".to_i, "#{d}#{e}#{f}".to_i, "1#{g}#{h}#{i}".to_i] }
  .select { |a, b, c| a < b && a + b == c }
  .map { |a, b, c| "#{a} + #{b} = #{c}" }
ruby 2.5.5p157 (2019-03-15 revision 67260) [x86_64-linux]