aboutsummaryrefslogtreecommitdiff
path: root/2022/25/a.rs
blob: 1d7e62b449a1a4ac6d08b04f75ca8682dafa4da6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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}");
}

Generated with cgit - Back to sebastiano.tronto.net