結果
問題 | No.342 一番ワロタww |
ユーザー |
![]() |
提出日時 | 2021-01-11 17:27:01 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 32 ms / 5,000 ms |
コード長 | 486 bytes |
コンパイル時間 | 181 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,624 KB |
最終ジャッジ日時 | 2024-11-21 09:17:30 |
合計ジャッジ時間 | 1,208 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 14 |
ソースコード
S = input() mx = 0 i = 0 while i < len(S): j = i while j < len(S) and S[j] != "w": j = j + 1 if j == len(S): break cnt = 0 while j + cnt < len(S) and S[j + cnt] == "w": cnt = cnt + 1 if i != j: mx = max(mx, cnt) i = j + cnt i = 0 while i < len(S): j = i while j < len(S) and S[j] != "w": j = j + 1 if j == len(S): break cnt = 0 while j + cnt < len(S) and S[j + cnt] == "w": cnt = cnt + 1 if i != j and cnt == mx: print(S[i:j]) i = j + cnt