結果
問題 |
No.342 一番ワロタww
|
ユーザー |
![]() |
提出日時 | 2020-04-03 18:30:06 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 585 bytes |
コンパイル時間 | 486 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-07-03 01:05:43 |
合計ジャッジ時間 | 1,796 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | WA * 14 |
ソースコード
import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines S = readline().decode().strip() while S.startswith('w'): S = S[1:] print(S) cans = [] is_w = False t = "" for s in S: if s == 'w': is_w = True elif is_w and s != 'w': cans.append(t) is_w = False t = "" t += s cans.append(t) res = [] for can in cans: cnt = can.count('w') res.append([cnt, can.replace('w', '')]) res = sorted(res) x = res[-1][0] for r in res: if r[0] == x: print(r[1])