結果
問題 |
No.342 一番ワロタww
|
ユーザー |
|
提出日時 | 2016-02-12 23:31:56 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 426 bytes |
コンパイル時間 | 85 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-09-22 05:00:04 |
合計ジャッジ時間 | 1,240 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 2 |
other | AC * 10 WA * 4 |
ソースコード
s = input() while s and s[0] == "w": s = s[1:] ans = [] mxc = 0 curc = 0 sent = "" for si in s: if si == "w": if sent: if curc == mxc: ans.append(sent) elif curc > mxc: ans = [sent] mxc = max(mxc, curc) curc = 0 sent = "" else: curc += 1 else: sent += si for a in ans: print(a)