結果
問題 | No.2259 Gas Station |
ユーザー |
👑 |
提出日時 | 2023-04-08 19:02:12 |
言語 | Lua (LuaJit 2.1.1734355927) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 250 bytes |
コンパイル時間 | 181 ms |
コンパイル使用メモリ | 6,948 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-03 15:33:37 |
合計ジャッジ時間 | 943 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 |
ソースコード
l, r, c = io.read("*n", "*n", "*n")r = math.min(r, l + 1000)ans = 999LLfor i = l, r doz = (1LL * i * c) % 1000LLz = 1000LL - zif z == 1000LL then z = 0LL endif z < ans then ans = z endendans = tostring(ans):gsub("LL", "")print(ans)