結果
| 問題 | No.1005 BOT対策 |
| コンテスト | |
| ユーザー |
hiraku
|
| 提出日時 | 2020-03-06 21:50:08 |
| 言語 | Python3 (3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 252 bytes |
| 記録 | |
| コンパイル時間 | 55 ms |
| コンパイル使用メモリ | 14,848 KB |
| 実行使用メモリ | 11,008 KB |
| 最終ジャッジ日時 | 2026-09-16 12:37:33 |
| 合計ジャッジ時間 | 2,868 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 23 WA * 6 |
ソースコード
s = list(input())
t = list(input())
ns = len(s)
nt = len(t)
if len(t) == 1 and s.count(t) > 0:
print(-1)
else:
cnt = 0
for i in range(ns - nt + 1):
if s[i:i+nt] == t:
cnt += 1
s[i+nt-2] = "."
print(cnt)
hiraku