結果

問題 No.341 沈黙の期間
コンテスト
ユーザー phspls
提出日時 2020-02-22 19:12:13
言語 Rust
(1.99.1 + proconio + num + itertools + ACL)
コンパイル:
/usr/bin/rustc_custom
実行:
./target/release/main
結果
AC  
実行時間 1 ms / 5,000 ms
+ 134µs
コード長 380 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 13,343 ms
コンパイル使用メモリ 173,264 KB
実行使用メモリ 9,832 KB
最終ジャッジ日時 2026-11-10 20:51:49
合計ジャッジ時間 14,860 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge7_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 15
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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