fixed errors

master
Jeff Yates 2020-12-02 10:23:24 -05:00
parent 38a4e4d6d5
commit c6b86066c5
1 changed files with 2 additions and 2 deletions

4
day01/solution1.rb Normal file → Executable file
View File

@ -1,11 +1,11 @@
#!/bin/env ruby #!/bin/env ruby
#Find the two entries that sum to 2020; what do you get if you multiply them together? #Find the two entries that sum to 2020; what do you get if you multiply them together?
numbers = File.readlines(./input) numbers = File.readlines('./input')
numbers.each do |num1| numbers.each do |num1|
numbers.each do |num2| numbers.each do |num2|
sum = num1 + num2 sum = num1 + num2
puts num1 + '+' num2 '=' sum puts num1 + '+' + num2 + '=' + sum
if sum == 2020 if sum == 2020
puts num1 * num2 puts num1 * num2
exit exit