結果
| 問題 | No.1005 BOT対策 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-01-03 21:25:04 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 58 ms / 2,000 ms |
| + 625µs | |
| コード長 | 255 bytes |
| 記録 | |
| コンパイル時間 | 222 ms |
| コンパイル使用メモリ | 96,236 KB |
| 実行使用メモリ | 83,372 KB |
| 最終ジャッジ日時 | 2026-07-12 09:10:14 |
| 合計ジャッジ時間 | 3,551 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 29 |
ソースコード
S = list(input())
T = input()
NT = len(T)
if NT == 1 and T in S:
print(-1)
exit()
cnt = 0
pont = 0
while pont < len(S)-NT+1:
s = ''.join(S[pont:pont+NT])
if s == T:
S.insert(pont+NT-1,'.')
cnt += 1
pont += 1
print(cnt)