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.split("\n").map(&:to_i).each_cons(2).count {|x,y| x < y }
|
|
p ARGF.read.split("\n").map(&:to_i).each_cons(3).map(&:sum).each_cons(2).count {|x,y| x < y }
|