diff options
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 | } | ||
