結果
問題 |
No.1005 BOT対策
|
ユーザー |
![]() |
提出日時 | 2023-05-06 08:21:31 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 42 ms / 2,000 ms |
コード長 | 260 bytes |
コンパイル時間 | 160 ms |
コンパイル使用メモリ | 81,976 KB |
実行使用メモリ | 53,852 KB |
最終ジャッジ日時 | 2025-06-20 01:42:27 |
合計ジャッジ時間 | 2,143 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 29 |
ソースコード
s =input() t =input() if len(t) == 1: if t not in s: print(0) else: print(-1) exit() i=0 cnt=0 while i < len(s): if s[i:i+len(t)] == t: cnt+=1 i = i + len(t) - 1 else: i += 1 print(cnt)