結果

問題 No.341 沈黙の期間
ユーザー phspls
提出日時 2020-02-22 19:12:13
言語 Rust
(1.83.0 + proconio)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 380 bytes
コンパイル時間 12,710 ms
コンパイル使用メモリ 387,132 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-09 20:44:24
合計ジャッジ時間 13,648 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

use std::cmp::max;

fn main() {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).ok();
    let s: &str = s.trim();

    let mut count: usize = 0;
    let mut cmax: usize = 0;
    for c in s.split("") {
        match c {
            "…" => { count += 1; cmax = max(cmax, count); },
            _ => { count = 0; },
        }
    }
    println!("{}", cmax);
}
0