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

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

ARGF . each_line do
    | line |
    a, b = line . strip() . split (" ")
    puts (a . to_i(2) + b . to_i(2)) . to_s(2)
end