aboutsummaryrefslogtreecommitdiff
path: root/challenge-117/abigail/ruby/ch-1.rb
blob: 73020122d4e94ca4fb612892c99ca4cd777ae95d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/ruby

#
# See ../README.md
#
 
#
# Run as: ruby ch-1.rb < input-file
#

sum = 0
SUM_15 = 120
ARGF . each_line do
    |line|
    sum += ((line . split (/,/)) [0]) . to_i
end

puts (SUM_15 - sum)