You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
p ARGF.read.strip.split("\n")
|
|
.map {|line| line.split("\t").map(&:to_i) }
|
|
.map {|row| row.combination(2).map(&:sort).map(&:reverse).find {|a,b| (a.to_f / b.to_f) * 10 % 10 == 0 }}
|
|
.map {|a,b| a / b}
|
|
.sum
|