Make space for two-digit days
This commit is contained in:
parent
0967b498c7
commit
07eb60e5e1
29 changed files with 0 additions and 1584 deletions
10
2019/day01/part1.rb
Normal file
10
2019/day01/part1.rb
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
answer = 0
|
||||
File.open(File.join(__dir__, 'input')) do |file|
|
||||
file.readlines.each do |line|
|
||||
mass = line.to_i
|
||||
answer += (mass / 3).truncate - 2
|
||||
end
|
||||
end
|
||||
puts answer
|
||||
Loading…
Reference in a new issue