結果

問題 No.632 穴埋め門松列
ユーザー phsplsphspls
提出日時 2020-02-09 12:24:09
言語 Rust
(1.77.0)
結果
AC  
実行時間 1 ms / 1,000 ms
コード長 449 bytes
コンパイル時間 638 ms
コンパイル使用メモリ 174,696 KB
実行使用メモリ 6,676 KB
最終ジャッジ日時 2024-04-08 12:07:05
合計ジャッジ時間 1,055 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

use std::io::Read;
use std::cmp::min;

fn main() {
    let mut a = String::new();
    std::io::stdin().read_to_string(&mut a).ok();
    let a: Vec<usize> = a.trim().split('\n').next().unwrap().split_whitespace()
        .map(|s| s.parse::<usize>().unwrap_or_else(|_| 0))
        .collect();
    if min(a[0], a[2]) == 2 {
        println!("{}", 14);
    } else if a[1] == 2 {
        println!("{}", 4);
    } else {
        println!("{}", 1);
    }
}
0