結果

問題 No.2298 yukicounter
ユーザー miya145592
提出日時 2023-05-12 22:01:22
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 353 bytes
コンパイル時間 254 ms
コンパイル使用メモリ 82,568 KB
実行使用メモリ 77,440 KB
最終ジャッジ日時 2024-11-28 18:22:30
合計ジャッジ時間 2,936 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 29 RE * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

S = input()
y = "yukicoder"
ans = 0
cnt = 0
i = 0
while i<len(S):
    flag = True
    for j in range(len(y)):
        if y[j]!=S[i]:
            flag = False
            if j==0:
                i+=1
            break
        i+=1
    if flag:
        cnt += 1
        ans = max(ans, cnt)
    else:
        ans = max(ans, cnt)
        cnt = 0
print(ans)
0