結果

問題 No.2298 yukicounter
ユーザー
提出日時 2024-07-16 23:18:35
言語 Rust
(1.83.0 + proconio)
結果
AC  
実行時間 5 ms / 2,000 ms
コード長 268 bytes
コンパイル時間 15,636 ms
コンパイル使用メモリ 377,240 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-16 23:18:52
合計ジャッジ時間 17,076 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 30
権限があれば一括ダウンロードができます

ソースコード

diff #

fn main() {
	let mut s = String::new();
	std::io::stdin().read_line(&mut s).ok();
	let (mut a, mut b) = (0, 0);
	for w in s.trim().split("yukicoder").skip(1) {
		if w.is_empty() {
			b += 1;
		} else {
			a = a.max(b + 1);
			b = 0;
		}
	}
	println!("{}", a.max(b))
}
0