結果

問題 No.481 1から10
ユーザー iwot
提出日時 2019-04-25 11:11:29
言語 Rust
(1.83.0 + proconio)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 400 bytes
コンパイル時間 12,602 ms
コンパイル使用メモリ 401,164 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-18 12:09:56
合計ジャッジ時間 12,618 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

fn main() {
    let mut input = String::new();
    let _ = std::io::stdin().read_line(&mut input);
    let input: Vec<i32> = input.trim().split_whitespace().map(|n| n.parse().unwrap()).collect();
    let mut prev = 0;
    let mut result = 10;
    for i in input {
        if i - prev > 1 {
            result = i - 1;
            break;
        }
        prev = i;
    }
    println!("{}", result);
}
0