結果

問題 No.342 一番ワロタww
ユーザー tanimani364
提出日時 2021-03-21 17:59:36
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
RE  
実行時間 -
コード長 563 bytes
コンパイル時間 117 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-11-22 12:01:51
合計ジャッジ時間 1,296 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample RE * 3
other RE * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python3
#coding:utf-8
from __future__ import unicode_literals
import math
from sys import stdin
# import numpy as np
# from matplotlib import pyplot as plt



def main():
	read=stdin.readline

	#edit here!
	s=read().decode('utf-8')

	cnt=0
	maxv=0
	x=""
	ans=[]
	for i in s:
		if i=='w':
			cnt+=1
		else:
			if x!="" and maxv < cnt:
				
				maxv=cnt
				ans=[]
				ans.append(x)
			elif cnt>0 and maxv==cnt:
				ans.append(x)
			
			if cnt==0:
				x+=i
			else:
				x=i
			cnt=0

	for i in ans:
		print(i)
if __name__ == '__main__':
    main()
0