結果

問題 No.1472 作為の和
ユーザー StrorkisStrorkis
提出日時 2021-04-09 23:20:50
言語 Rust
(1.77.0)
結果
WA  
実行時間 -
コード長 847 bytes
コンパイル時間 1,747 ms
コンパイル使用メモリ 137,516 KB
実行使用メモリ 4,504 KB
最終ジャッジ日時 2023-09-07 13:09:49
合計ジャッジ時間 2,501 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

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 {
        println!("{} 2", 8 + 9 * 2 * n);
    }
}

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