From bd6ca419e4b8da084e988efb7581156dfbd557ac Mon Sep 17 00:00:00 2001 From: Bill Thiede Date: Wed, 2 Dec 2020 09:05:47 -0800 Subject: [PATCH] Add day 1 part 2 docstring. --- 2020/src/bin/day1.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/2020/src/bin/day1.rs b/2020/src/bin/day1.rs index 6cf25e1..7ec5d4a 100644 --- a/2020/src/bin/day1.rs +++ b/2020/src/bin/day1.rs @@ -22,6 +22,13 @@ //! In this list, the two entries that sum to 2020 are 1721 and 299. Multiplying them together produces 1721 * 299 = 514579, so the correct answer is 514579. //! //! Of course, your expense report is much larger. Find the two entries that sum to 2020; what do you get if you multiply them together? +//! +//! -- Part Two --- +//! The Elves in accounting are thankful for your help; one of them even offers you a starfish coin they had left over from a past vacation. They offer you a second one if you can find three numbers in your expense report that meet the same criteria. +//! +//! Using the above example again, the three entries that sum to 2020 are 979, 366, and 675. Multiplying them together produces the answer, 241861950. +//! +//! In your expense report, what is the product of the three entries that sum to 2020? use std::fs::File; use std::io::{BufRead, BufReader};