結果
問題 |
No.342 一番ワロタww
|
ユーザー |
|
提出日時 | 2016-02-12 23:23:16 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
RE
|
実行時間 | - |
コード長 | 622 bytes |
コンパイル時間 | 459 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-09-22 04:56:11 |
合計ジャッジ時間 | 1,333 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 13 RE * 1 |
ソースコード
s=input() head=0 while s[head]=='w': head+=1 s=s[head:] #最長のwを探す M=0 for i in range(len(s)): if s[i]=='w': j=i while j<len(s) and s[j]=='w': j+=1 M=max(M,j-i) ans=[] for i in range(len(s)): if s[i]=='w': j=i while j<len(s) and s[j]=='w': j+=1 #最長なのでここの文字列を探しに行く if j-i==M: st=i-1 while st>=0 and s[st]!='w': st-=1 #print("st=",st) ans.append(s[st+1:i]) for v in ans: if len(v)>0: print(v)