結果
| 問題 |
No.342 一番ワロタww
|
| コンテスト | |
| ユーザー |
Mr.Fuku
|
| 提出日時 | 2018-08-11 11:40:21 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 766 bytes |
| コンパイル時間 | 99 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 10,624 KB |
| 最終ジャッジ日時 | 2024-09-23 06:08:55 |
| 合計ジャッジ時間 | 1,319 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 11 WA * 3 |
ソースコード
s = input()
max_word = [s]
def cntw():
global max_word
max_cnt = 0
cnt = 0
i = len(s)-1
while i>=0:
if s[i]=="w":
while s[i]=="w":
cnt+=1
i-=1
if i<0:
return
if cnt>=max_cnt:
stock = ""
while s[i]!="w":
stock = s[i] + stock
i-=1
if i<0:
break
if cnt==max_cnt:
max_word.append(stock)
else:
max_cnt=cnt
max_word = [stock]
cnt=0
else:
i-=1
cntw()
max_word.reverse()
for ans in max_word:
print(ans)
Mr.Fuku