結果

問題 No.342 一番ワロタww
ユーザー takakintakakin
提出日時 2020-06-29 22:10:02
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 408 bytes
コンパイル時間 259 ms
コンパイル使用メモリ 10,732 KB
実行使用メモリ 7,940 KB
最終ジャッジ日時 2023-09-26 11:21:53
合計ジャッジ時間 1,938 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,772 KB
testcase_01 AC 16 ms
7,864 KB
testcase_02 AC 16 ms
7,840 KB
testcase_03 AC 16 ms
7,908 KB
testcase_04 AC 16 ms
7,812 KB
testcase_05 AC 16 ms
7,856 KB
testcase_06 AC 16 ms
7,864 KB
testcase_07 AC 15 ms
7,796 KB
testcase_08 AC 16 ms
7,804 KB
testcase_09 AC 16 ms
7,776 KB
testcase_10 AC 16 ms
7,940 KB
testcase_11 AC 16 ms
7,768 KB
testcase_12 AC 15 ms
7,768 KB
testcase_13 AC 15 ms
7,856 KB
testcase_14 AC 16 ms
7,864 KB
testcase_15 RE -
testcase_16 AC 18 ms
7,812 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input=lambda: sys.stdin.readline().rstrip()
S=input()
while True:
  if S[0]=="w":
    S=S[1:]
  else:
    break
A=[]
B=[]
cur=""
ct=0
for s in S:
  if s=="w" and ct==0:
    A.append(cur)
    cur=""
    ct=1
  elif s=="w":
    ct+=1
  elif ct!=0:
    B.append(ct)
    cur+=s
    ct=0
  else:
    cur+=s
    ct=0
B.append(ct)

n=len(A)
m=max(B)
for i in range(n):
  if B[i]==m:
    print(A[i])
0