結果

問題 No.342 一番ワロタww
ユーザー HAHAHAHAHAHA
提出日時 2016-09-20 12:43:46
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 15 ms / 5,000 ms
コード長 274 bytes
コンパイル時間 85 ms
コンパイル使用メモリ 10,736 KB
実行使用メモリ 7,944 KB
最終ジャッジ日時 2023-08-05 16:18:44
合計ジャッジ時間 1,068 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 13 ms
7,936 KB
testcase_01 AC 15 ms
7,944 KB
testcase_02 AC 14 ms
7,784 KB
testcase_03 AC 13 ms
7,788 KB
testcase_04 AC 13 ms
7,856 KB
testcase_05 AC 13 ms
7,836 KB
testcase_06 AC 12 ms
7,840 KB
testcase_07 AC 13 ms
7,836 KB
testcase_08 AC 12 ms
7,832 KB
testcase_09 AC 14 ms
7,840 KB
testcase_10 AC 14 ms
7,792 KB
testcase_11 AC 12 ms
7,888 KB
testcase_12 AC 13 ms
7,932 KB
testcase_13 AC 13 ms
7,840 KB
testcase_14 AC 12 ms
7,928 KB
testcase_15 AC 14 ms
7,884 KB
testcase_16 AC 13 ms
7,860 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

s = input() + "+"
while s and s[0]=="w" : s = s[1:]
ans =[]
M=0
cnt=0
s2=""

for si in s:
	if si == "w":
		cnt+=1
	else:
		if cnt > 0:
			if cnt ==M:
				ans.append(s2)
			elif cnt > M:
				ans=[s2]
			M = max(M,cnt)
			cnt = 0
			s2=""
		s2+=si

for a in ans:
	print(a)
0