結果
| 問題 | No.1005 BOT対策 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-07-04 18:42:54 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 369 bytes |
| 記録 | |
| コンパイル時間 | 345 ms |
| コンパイル使用メモリ | 20,700 KB |
| 実行使用メモリ | 20,604 KB |
| 最終ジャッジ日時 | 2026-04-07 14:54:43 |
| 合計ジャッジ時間 | 5,087 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 WA * 4 RE * 5 |
ソースコード
s = input()
t = input()
if len(s) == 1:
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)