結果
| 問題 |
No.342 一番ワロタww
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-09-14 20:32:34 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 41 ms / 5,000 ms |
| コード長 | 425 bytes |
| コンパイル時間 | 1,535 ms |
| コンパイル使用メモリ | 81,764 KB |
| 実行使用メモリ | 52,352 KB |
| 最終ジャッジ日時 | 2024-06-27 11:37:08 |
| 合計ジャッジ時間 | 2,010 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 14 |
ソースコード
s=input()
res=0
now=0
while len(s) and s[0]=='w':
s=s[1:]
for i in range(len(s)):
if s[i]=='w':
now+=1
else:
res=max(res,now)
now=0
res=max(res,now)
if res==0:
print('')
exit()
s+='お'
left=0
now=0
for i in range(len(s)):
if s[i]=='w':
now+=1
elif i-1>=0 and s[i-1]=='w':
if res==now:
print(s[left:i-res])
now=0
left=i