結果
| 問題 | No.1005 BOT対策 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-07-04 18:42:26 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 369 bytes |
| 記録 | |
| コンパイル時間 | 410 ms |
| コンパイル使用メモリ | 20,700 KB |
| 実行使用メモリ | 20,444 KB |
| 最終ジャッジ日時 | 2026-04-07 14:53:57 |
| 合計ジャッジ時間 | 6,512 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 19 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)