結果

問題 No.342 一番ワロタww
ユーザー soupesuteakasoupesuteaka
提出日時 2016-03-07 13:43:31
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 641 bytes
コンパイル時間 86 ms
コンパイル使用メモリ 11,960 KB
実行使用メモリ 10,136 KB
最終ジャッジ日時 2023-10-24 20:15:45
合計ジャッジ時間 1,343 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
10,136 KB
testcase_01 AC 30 ms
10,136 KB
testcase_02 AC 30 ms
10,136 KB
testcase_03 AC 32 ms
10,136 KB
testcase_04 AC 29 ms
10,136 KB
testcase_05 AC 29 ms
10,136 KB
testcase_06 AC 30 ms
10,136 KB
testcase_07 AC 29 ms
10,136 KB
testcase_08 AC 29 ms
10,136 KB
testcase_09 AC 29 ms
10,136 KB
testcase_10 AC 29 ms
10,136 KB
testcase_11 AC 30 ms
10,136 KB
testcase_12 AC 29 ms
10,136 KB
testcase_13 AC 29 ms
10,136 KB
testcase_14 AC 29 ms
10,136 KB
testcase_15 AC 29 ms
10,136 KB
testcase_16 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#coding: UTF-8

import sys
from math import log
from collections import deque
from functools import reduce

### defs ###

### main ###
S = sys.stdin.readline().strip('\r\n')
part = []
sntnc = ''
for c in S:
	if (c=='w'):
		if (len(sntnc)!=0 and sntnc[0]!='w'):
			part.append(sntnc)
			sntnc=c
		else:
			sntnc += c
	else:
		if (len(sntnc)!=0 and sntnc[0]=='w'):
			part.append(sntnc)
			sntnc=c
		else:
			sntnc += c
part.append(sntnc)

mx = 0
for p in part:
	if(p[0]=='w'):
		mx = max(mx, len(p))

ans = []
for i in range(1,len(part)):
	p = part[i]
	if(p[0]=='w' and len(p) == mx):
		ans.append(part[i-1])
for a in ans:
	print(a)
0