結果
問題 |
No.342 一番ワロタww
|
ユーザー |
|
提出日時 | 2023-02-21 21:52:36 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 603 bytes |
コンパイル時間 | 84 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-07-22 06:26:44 |
合計ジャッジ時間 | 1,245 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | AC * 6 WA * 8 |
ソースコード
s = input() n = len(s) l = 0 ANS = [] res = 0 cnt = 0 f = 0 for i in range(n): if s[i] == 'w': res += 1 if i == n - 1: if res > l: l = res ANS = [s[f:f + cnt]] elif res == l: ANS.append(s[f:f + cnt]) else: if res == 0: cnt += 1 else: if res > l: l = res ANS = [s[f:f + cnt]] elif res == l: ANS.append(s[f:f + cnt]) f += cnt + res cnt = 0 res = 0 print(*ANS, sep='\n')