結果
| 問題 |
No.1005 BOT対策
|
| コンテスト | |
| ユーザー |
👑 |
| 提出日時 | 2020-03-10 09:00:33 |
| 言語 | Lua (LuaJit 2.1.1734355927) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 277 bytes |
| コンパイル時間 | 117 ms |
| コンパイル使用メモリ | 7,972 KB |
| 実行使用メモリ | 7,844 KB |
| 最終ジャッジ日時 | 2025-06-20 00:50:39 |
| 合計ジャッジ時間 | 974 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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