結果
| 問題 | No.342 一番ワロタww |
| コンテスト | |
| ユーザー |
norioc
|
| 提出日時 | 2024-07-17 02:03:30 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 37 ms / 5,000 ms |
| コード長 | 359 bytes |
| 記録 | |
| コンパイル時間 | 617 ms |
| コンパイル使用メモリ | 85,120 KB |
| 実行使用メモリ | 64,000 KB |
| 最終ジャッジ日時 | 2026-03-31 16:29:47 |
| 合計ジャッジ時間 | 1,967 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 14 |
ソースコード
import re
S = input()
w = 'w'
reg = re.compile('^[^w]*w+')
s = S
cands = []
while m := reg.match(s):
t = m.group(0)
if t[0] != w:
cands.append((t, t.count(w)))
s = s[len(t):]
if not cands:
print()
exit()
_, max_wcnt = max(cands, key=lambda x: x[1])
for s, wcnt in cands:
if wcnt == max_wcnt:
print(s[:-wcnt])
norioc