結果
問題 | No.342 一番ワロタww |
ユーザー |
|
提出日時 | 2019-02-01 12:34:23 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 38 ms / 5,000 ms |
コード長 | 568 bytes |
コンパイル時間 | 93 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 11,392 KB |
最終ジャッジ日時 | 2024-11-21 22:09:56 |
合計ジャッジ時間 | 1,391 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 14 |
ソースコード
import random import time import copy import io, sys s = input() list1 = [] buf = [] cnt = 0 for c in s: if (c == 'w'): cnt += 1 elif (c != 'w' and cnt != 0): if (len(buf) > 0): list1.append((''.join(buf), cnt)) buf = [c] cnt = 0 else: buf.append(c) if (cnt != 0): list1.append((''.join(buf), cnt)) list1.sort(key=lambda t:t[1], reverse=True) #print(list1) if (len(list1) > 0 and list1[0][1] > 0): for t in list1: if (t[1] != list1[0][1]): break if (t[0] != ""): print(t[0])