diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2025-07-10 08:33:07 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2025-07-10 08:33:07 +0200 |
| commit | ded2e314c9ea61e71d89607b93a85c64a4c82ab7 (patch) | |
| tree | b3977e5d3c53a012f725da3d504a728824c1c7e3 /2022/25/a.rs | |
| parent | ee0cbf2ec592b28dca6d1142639e06de52ff1b3e (diff) | |
| download | aoc-ded2e314c9ea61e71d89607b93a85c64a4c82ab7.tar.gz aoc-ded2e314c9ea61e71d89607b93a85c64a4c82ab7.zip | |
Merry Christmas 2022
Diffstat (limited to '2022/25/a.rs')
| -rw-r--r-- | 2022/25/a.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/2022/25/a.rs b/2022/25/a.rs new file mode 100644 index 0000000..1d7e62b --- /dev/null +++ b/2022/25/a.rs | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | mod common; | ||
| 2 | use common::*; | ||
| 3 | |||
| 4 | fn main() { | ||
| 5 | let mut line = String::new(); | ||
| 6 | let mut sum = Snafu::zero(); | ||
| 7 | while std::io::stdin().read_line(&mut line).unwrap() > 0 { | ||
| 8 | let s = Snafu::from_str(&line[..line.len()-1]); | ||
| 9 | sum += &s; | ||
| 10 | line.clear(); | ||
| 11 | } | ||
| 12 | println!("{sum}"); | ||
| 13 | } | ||
