結果
| 問題 | No.1005 BOT対策 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-03-10 09:00:33 |
| 言語 | Lua (LuaJit 2.1.1774638290) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| + 72µs | |
| コード長 | 277 bytes |
| 記録 | |
| コンパイル時間 | 224 ms |
| コンパイル使用メモリ | 9,276 KB |
| 実行使用メモリ | 9,388 KB |
| 最終ジャッジ日時 | 2026-07-12 08:20:11 |
| 合計ジャッジ時間 | 1,740 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 29 |
ソースコード
local s = io.read()
local t = io.read()
if #t == 1 then
if s:find(t) then
print(-1)
else
print(0)
end
else
local c = 0
local pos = 1
while true do
z, pos = s:find(t, pos)
if pos then
c = c + 1
else
break
end
end
print(c)
end