[2018][ruby][08]

sorbet
Alpha Chen 6 years ago
parent 8aa06e54fd
commit 8799d3e75d

@ -1,5 +1,3 @@
raw = ARGF.read.chomp.split(/\s+/).map(&:to_i)
class Node class Node
def self.from(raw) def self.from(raw)
child_count = raw.shift child_count = raw.shift
@ -30,5 +28,6 @@ class Node
end end
end end
raw = ARGF.read.chomp.split(/\s+/).map(&:to_i)
root = Node.from(raw) root = Node.from(raw)
p root.value p root.value

Loading…
Cancel
Save