結果

問題 No.2298 yukicounter
ユーザー rts_tatsurts_tatsu
提出日時 2023-05-24 22:43:36
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 590 ms / 2,000 ms
コード長 195 bytes
コンパイル時間 294 ms
コンパイル使用メモリ 10,592 KB
実行使用メモリ 9,780 KB
最終ジャッジ日時 2023-08-25 14:21:06
合計ジャッジ時間 5,337 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,808 KB
testcase_01 AC 15 ms
7,792 KB
testcase_02 AC 15 ms
7,848 KB
testcase_03 AC 406 ms
9,152 KB
testcase_04 AC 160 ms
8,316 KB
testcase_05 AC 40 ms
7,800 KB
testcase_06 AC 590 ms
9,780 KB
testcase_07 AC 149 ms
8,268 KB
testcase_08 AC 55 ms
8,108 KB
testcase_09 AC 92 ms
8,128 KB
testcase_10 AC 29 ms
7,876 KB
testcase_11 AC 114 ms
8,312 KB
testcase_12 AC 111 ms
8,160 KB
testcase_13 AC 59 ms
8,216 KB
testcase_14 AC 62 ms
8,184 KB
testcase_15 AC 16 ms
7,968 KB
testcase_16 AC 32 ms
8,040 KB
testcase_17 AC 28 ms
8,152 KB
testcase_18 AC 15 ms
7,908 KB
testcase_19 AC 16 ms
7,916 KB
testcase_20 AC 15 ms
7,872 KB
testcase_21 AC 15 ms
7,872 KB
testcase_22 AC 31 ms
8,312 KB
testcase_23 AC 29 ms
8,236 KB
testcase_24 AC 85 ms
9,744 KB
testcase_25 AC 46 ms
8,760 KB
testcase_26 AC 26 ms
8,136 KB
testcase_27 AC 68 ms
9,300 KB
testcase_28 AC 24 ms
8,100 KB
testcase_29 AC 23 ms
8,108 KB
testcase_30 AC 16 ms
7,816 KB
testcase_31 AC 21 ms
7,972 KB
testcase_32 AC 25 ms
8,252 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

s=input()
t='yukicoder'
n=len(t)
ans=0
c=0
i=0
while i+n<=len(s):
    if s[i:i+n]==t:
        c+=1
        i+=n
    else:
        ans=max(ans,c)
        c=0
        i+=1
ans=max(ans,c)
print(ans)
0