fixed type errors, gotta cast duh

master
Jeff Yates 2020-12-02 10:27:44 -05:00
parent c6b86066c5
commit a28408d4d2
1 changed files with 3 additions and 3 deletions

View File

@ -4,10 +4,10 @@
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.to_i + num2.to_i
puts num1 + '+' + num2 + '=' + sum puts num1 + '+' + num2 + '=' + sum.to_s
if sum == 2020 if sum == 2020
puts num1 * num2 puts num1.to_i * num2.to_i
exit exit
end end
end end