結果
| 問題 |
No.342 一番ワロタww
|
| コンテスト | |
| ユーザー |
Konton7
|
| 提出日時 | 2020-05-18 16:34:20 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 31 ms / 5,000 ms |
| コード長 | 567 bytes |
| コンパイル時間 | 114 ms |
| コンパイル使用メモリ | 12,800 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-10-01 21:57:35 |
| 合計ジャッジ時間 | 1,410 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 14 |
ソースコード
s = input()
s += "あ"
t = ""
ans = ""
ans_list = []
maxans = 0
w = 0
status = 0
for i in s:
if status == 0 and i == "w":
status = 1
w = 1
elif status == 0 and i != "w":
t += i
elif status == 1 and i == "w":
w += 1
elif status == 1 and i != "w":
status = 0
if t != "":
ans_list.append((w, t))
t = i
if ans_list == []:
print("")
else:
for i in ans_list:
maxans = max(maxans, i[0])
for i in ans_list:
if maxans == i[0]:
print(i[1])
Konton7