結果

問題 No.2194 兄弟の掛け引き
コンテスト
ユーザー obakyan
提出日時 2023-01-25 16:09:04
言語 Lua
(LuaJit 2.1.1767980792)
コンパイル:
luajit -b _filename_ a.out
実行:
luajit _filename_
結果
AC  
実行時間 1 ms / 1,000 ms
コード長 268 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 100 ms
コンパイル使用メモリ 7,720 KB
実行使用メモリ 7,720 KB
最終ジャッジ日時 2026-03-13 14:38:49
合計ジャッジ時間 812 ms
ジャッジサーバーID
(参考情報)
judge1_1 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 14
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

a, b, c = io.read("*n", "*n", "*n")
t = {}
if c <= b then
  if c % a == 0 then
    table.insert(t, math.floor(c / a))
  end
end
if (c + b) % a == 0 then
  table.insert(t, math.floor((c + b) / a))
end
if #t == 0 then
  print(-1)
else
  print(table.concat(t, "\n"))
end
0