結果

問題 No.1472 作為の和
ユーザー StrorkisStrorkis
提出日時 2021-04-09 23:19:03
言語 Rust
(1.77.0)
結果
WA  
実行時間 -
コード長 911 bytes
コンパイル時間 468 ms
コンパイル使用メモリ 135,752 KB
実行使用メモリ 6,324 KB
最終ジャッジ日時 2023-09-07 13:07:29
合計ジャッジ時間 6,140 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
6,324 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 OLE -
testcase_05 OLE -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

fn run<'a, I: Iterator<Item = &'a str>>(mut scanner: I) {
    macro_rules! scan {
        ([$t:tt; $n:expr]) => ((0..$n).map(|_| scan!($t)).collect::<Vec<_>>());
        (($($t:tt),*)) => (($(scan!($t)),*));
        ([$($t:tt),*]) => ([$(scan!($t)),*]);
        (Usize1) => (scan!(usize) - 1);
        (Bytes) => (scan!(String).into_bytes());
        ($t:ty) => (scanner.next().unwrap().parse::<$t>().unwrap());
    }
    macro_rules! input {
        ($($($v:ident)* : $t:tt),* $(,)?) => ($(let $($v)* = scan!($t);)*);
    }
    
    input! {
        n: usize,
    }

    if n == 0 {
        println!("9 1");
    } else {
        print!("8");
        for _ in 0..n {
            print!("99");
        }
        println!(" 2");
    }
}

fn main() {
    let ref mut buf = Vec::new();
    std::io::Read::read_to_end(&mut std::io::stdin(), buf).ok();
    run(std::str::from_utf8(buf).unwrap().split_whitespace());
}
0