結果
問題 | No.2298 yukicounter |
ユーザー |
|
提出日時 | 2023-05-12 22:02:25 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 67 ms / 2,000 ms |
コード長 | 418 bytes |
コンパイル時間 | 274 ms |
コンパイル使用メモリ | 82,304 KB |
実行使用メモリ | 77,056 KB |
最終ジャッジ日時 | 2024-11-28 18:25:02 |
合計ジャッジ時間 | 3,196 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 30 |
ソースコード
S = input()y = "yukicoder"ans = 0cnt = 0i = 0while i<len(S):flag = Truefor j in range(len(y)):if i>=len(S):flag = Falsebreakif y[j]!=S[i]:flag = Falseif j==0:i+=1breaki+=1if flag:cnt += 1ans = max(ans, cnt)else:ans = max(ans, cnt)cnt = 0print(ans)