結果
問題 | No.1005 BOT対策 |
ユーザー |
👑 |
提出日時 | 2020-07-04 18:42:26 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 369 bytes |
コンパイル時間 | 168 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,624 KB |
最終ジャッジ日時 | 2024-09-19 07:01:31 |
合計ジャッジ時間 | 2,247 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 17 WA * 5 RE * 5 |
ソースコード
s = input() t = input() if len(s) == 0: if s in t: print(-1) else: print(0) exit() ans = 0 pos = 0 n = len(t) for st in s: if st == t[pos]: pos += 1 if pos == n: ans += 1 if t[0] == t[-1]: pos = 1 else: pos = 0 else: pos = 0 print(ans)