Submission #19219358


Source Code Expand

Copy
use proconio::input;
use proconio::marker::Chars;

fn main() {
    input! {
        mut n: Chars,
    };
    n.reverse();

    let mut o = 0_usize;
    let mut e = 0_usize;
    for i in (0..n.len()).step_by(2) {
        o += (n[i] as u8 - '0' as u8) as usize;
        if i + 1 < n.len() {
            e += (n[i + 1] as u8 - '0' as u8) as usize;
        }
    }

    println!("{} {}", e, o);
}

Submission Info

Submission Time
Task B - 11の倍数
User bouzuya
Language Rust (1.42.0)
Score 100
Code Size 393 Byte
Status AC
Exec Time 7 ms
Memory 2168 KB

Judge Result

Set Name All
Score / Max Score 100 / 100
Status
AC × 22
Set Name Test Cases
All sample_01.txt, sample_02.txt, sample_03.txt, test_01.txt, test_02.txt, test_03.txt, test_04.txt, test_05.txt, test_06.txt, test_07.txt, test_08.txt, test_09.txt, test_10.txt, test_11.txt, test_12.txt, test_13.txt, test_14.txt, test_15.txt, test_16.txt, sample_01.txt, sample_02.txt, sample_03.txt
Case Name Status Exec Time Memory
sample_01.txt AC 7 ms 1992 KB
sample_02.txt AC 2 ms 2060 KB
sample_03.txt AC 3 ms 1972 KB
test_01.txt AC 2 ms 1960 KB
test_02.txt AC 2 ms 2036 KB
test_03.txt AC 2 ms 2084 KB
test_04.txt AC 2 ms 2040 KB
test_05.txt AC 2 ms 2040 KB
test_06.txt AC 2 ms 1980 KB
test_07.txt AC 2 ms 2168 KB
test_08.txt AC 1 ms 2164 KB
test_09.txt AC 5 ms 1960 KB
test_10.txt AC 2 ms 1952 KB
test_11.txt AC 1 ms 2124 KB
test_12.txt AC 2 ms 2036 KB
test_13.txt AC 2 ms 2112 KB
test_14.txt AC 1 ms 2068 KB
test_15.txt AC 1 ms 1940 KB
test_16.txt AC 2 ms 2112 KB