結果
| 問題 | No.1005 BOT対策 |
| コンテスト | |
| ユーザー |
hiraku
|
| 提出日時 | 2020-03-06 21:50:08 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 252 bytes |
| 記録 | |
| コンパイル時間 | 453 ms |
| コンパイル使用メモリ | 20,824 KB |
| 実行使用メモリ | 15,488 KB |
| 最終ジャッジ日時 | 2026-05-01 19:39:08 |
| 合計ジャッジ時間 | 4,961 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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