parent
8119cc4b6a
commit
ca701f2f9b
@ -0,0 +1,8 @@
|
|||||||
|
require "set"
|
||||||
|
|
||||||
|
seen = Set.new
|
||||||
|
ARGF.read.lines.map(&:to_i).cycle.each.with_object([0]) do |i,n|
|
||||||
|
n[0] += i
|
||||||
|
p n[0] and exit if seen.include?(n[0])
|
||||||
|
seen << n[0]
|
||||||
|
end
|
Loading…
Reference in new issue