結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー panapanagdfpanapanagdf
提出日時 2019-09-19 21:14:03
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 479 bytes
コンパイル時間 213 ms
コンパイル使用メモリ 10,880 KB
実行使用メモリ 8,012 KB
最終ジャッジ日時 2023-09-27 10:39:22
合計ジャッジ時間 1,895 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
8,012 KB
testcase_01 AC 16 ms
7,948 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 16 ms
7,856 KB
testcase_08 AC 16 ms
7,868 KB
testcase_09 AC 15 ms
7,816 KB
testcase_10 WA -
testcase_11 AC 16 ms
7,852 KB
testcase_12 AC 17 ms
7,864 KB
testcase_13 AC 16 ms
7,804 KB
testcase_14 AC 16 ms
7,924 KB
testcase_15 AC 16 ms
7,800 KB
testcase_16 WA -
testcase_17 AC 16 ms
7,812 KB
testcase_18 AC 15 ms
7,804 KB
testcase_19 AC 16 ms
7,928 KB
testcase_20 AC 16 ms
7,824 KB
testcase_21 AC 16 ms
7,936 KB
testcase_22 AC 15 ms
7,820 KB
testcase_23 AC 16 ms
7,856 KB
testcase_24 AC 16 ms
7,816 KB
testcase_25 AC 16 ms
7,820 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

a=input()
b=input()
c=0
d=[]
for i in range(1,7):
    if a[i]==a[i-1]=="o":
        c+=1
    else:
        d.append(c)
        c=0
    if i==6:
        for j in range(6):
            if (a[i]=="o") and (b[j]=="o") and (j==0):
                c+=1
            elif b[j]==b[j-1]=="o":
                c+=1
            else:
                d.append(c)
                c=0  
                
                
        
d.append(c)
if max(d)==0:
    print(0)
else:
    print(max(d)+1)
0