結果
| 問題 |
No.204 ゴールデン・ウィーク(2)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-04-14 11:44:37 |
| 言語 | Python2 (2.7.18) |
| 結果 |
AC
|
| 実行時間 | 16 ms / 1,000 ms |
| コード長 | 342 bytes |
| コンパイル時間 | 244 ms |
| コンパイル使用メモリ | 6,784 KB |
| 実行使用メモリ | 6,144 KB |
| 最終ジャッジ日時 | 2024-12-24 11:52:32 |
| 合計ジャッジ時間 | 2,245 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 46 |
ソースコード
#coding: utf-8
##yuki_204
d=int(raw_input())
s1=raw_input()
s2=raw_input()
s='x'*d+s1+s2+'x'*d
res=0
for i in xrange(len(s)):
maxl=0
temp=d
for j in xrange(len(s)):
if j>=len(s):
break
if s[j]=='o':
maxl+=1
if j>=i:
temp=0
elif j>=i and temp>0:
temp-=1
maxl+=1
else:
maxl=0
res=max(maxl,res)
print res