結果
| 問題 | No.1940 Escape through + - |
| ユーザー |
|
| 提出日時 | 2022-05-18 22:33:06 |
| 言語 | Lua (LuaJit 2.1.1774638290) |
| 結果 |
AC
|
| 実行時間 | 17 ms / 2,000 ms |
| コード長 | 405 bytes |
| 記録 | |
| コンパイル時間 | 204 ms |
| コンパイル使用メモリ | 6,656 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-04-06 01:41:29 |
| 合計ジャッジ時間 | 1,056 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 25 |
ソースコード
local ffi = require("ffi")
local C = ffi.C
ffi.cdef[[
long long atoll(const char*);
]]
local function lltonumber(str)
return C.atoll(str)
end
local n, m, s = io.read():match("(%d+) (%d+) (%d+)")
n = tonumber(n)
m = lltonumber(m)
s = lltonumber(s)
local a = 0LL
for i = 1, n do
a = a + io.read("*n")
end
if a < s then a, s = s, a end
if (s - a) % m == 0LL then
print("Yes")
else
print("No")
end