結果

問題 No.333 門松列を数え上げ
ユーザー GoryudyumaGoryudyuma
提出日時 2017-03-16 09:01:31
言語 Rust
(1.72.1)
結果
WA  
実行時間 -
コード長 386 bytes
コンパイル時間 532 ms
コンパイル使用メモリ 140,048 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-17 04:55:27
合計ジャッジ時間 1,139 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

fn getline() -> String{
        let mut __ret=String::new();
        std::io::stdin().read_line(&mut __ret).ok();
        return __ret;
}

fn main(){
        let ab : Vec<i64> = getline().trim().split(' ').map(|x| x.parse().unwrap()).collect();
        let mut ans=ab[0] - 1;
        if ans < 1 || ans == ab[1] {
                ans = ab[0] + 1;
        }
        println!("{}", ans);
}
0