結果
| 問題 |
No.342 一番ワロタww
|
| コンテスト | |
| ユーザー |
peroon
|
| 提出日時 | 2019-06-05 20:23:30 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 703 bytes |
| コンパイル時間 | 71 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-09-22 07:24:41 |
| 合計ジャッジ時間 | 1,212 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 9 WA * 4 RE * 1 |
ソースコード
# -*- coding: utf-8 -*-
from collections import defaultdict
s = input()
#print(s)
L = len(s)
#print("L", L)
mp = defaultdict(list)
count = 0
t = ""
w = 'w'
last = ''
for i in reversed(range(L)):
#print(i)
c = s[i]
#print(c)
if c==w:
if last==w:
count += 1
else:
# register
mp[count].append(t)
t = ""
count = 1
# 文字
else:
if last=='':
continue
else:
t = c + t
last = c
#print("count", count)
if(t!=""):
mp[count].append(t)
# print(mp)
keys = list(mp.keys())
ma = keys[-1]
# print(ma)
texts = mp[ma]
for s in reversed(texts):
print(s)
peroon