結果
問題 |
No.342 一番ワロタww
|
ユーザー |
![]() |
提出日時 | 2020-02-02 18:41:16 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 435 bytes |
コンパイル時間 | 96 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-09-18 21:19:57 |
合計ジャッジ時間 | 1,062 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 13 WA * 1 |
ソースコード
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[-1] == '$'] for x in answer: print(x[:-1])