結果
問題 |
No.342 一番ワロタww
|
ユーザー |
|
提出日時 | 2018-08-13 05:22:03 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 33 ms / 5,000 ms |
コード長 | 435 bytes |
コンパイル時間 | 98 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,624 KB |
最終ジャッジ日時 | 2024-10-15 13:38:31 |
合計ジャッジ時間 | 1,332 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 14 |
ソースコード
import re from collections import defaultdict from sys import stdin, stdout input = lambda: stdin.readline() write = stdout.write def main(): S = input() regex = r'(w+)' s = re.split(regex, S.lstrip('w')) dic_ = defaultdict(list) maxlen = 0 for i in range(0, len(s) - 1, 2): l = len(s[i+1]) maxlen = max(maxlen, l) dic_[l].append(s[i]) print(*dic_[maxlen], sep='\n') main()