結果
問題 |
No.342 一番ワロタww
|
ユーザー |
![]() |
提出日時 | 2020-02-02 18:42:43 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 29 ms / 5,000 ms |
コード長 | 443 bytes |
コンパイル時間 | 68 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,496 KB |
最終ジャッジ日時 | 2024-09-18 21:20:01 |
合計ジャッジ時間 | 1,085 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 14 |
ソースコード
import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines S = read().decode().rstrip() while S and S[0] == 'w': S = S[1:] max_w = 0 for n in range(1,101): if S.find('w' * n) != -1: max_w = n if max_w == 0: exit() S = S.replace('w'*max_w, '@$').replace('w','$') answer = [x for x in S.split('$') if x and x[-1] == '@'] for x in answer: print(x[:-1])