From ded2e314c9ea61e71d89607b93a85c64a4c82ab7 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Thu, 10 Jul 2025 08:33:07 +0200 Subject: Merry Christmas 2022 --- 2022/25/a.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 2022/25/a.rs (limited to '2022/25/a.rs') 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 @@ +mod common; +use common::*; + +fn main() { + let mut line = String::new(); + let mut sum = Snafu::zero(); + while std::io::stdin().read_line(&mut line).unwrap() > 0 { + let s = Snafu::from_str(&line[..line.len()-1]); + sum += &s; + line.clear(); + } + println!("{sum}"); +} -- cgit v1.3