結果
| 問題 | No.2729 Addition and Multiplication in yukicoder (Easy) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-07-03 23:03:06 |
| 言語 | Lua (LuaJit 2.1.1774638290) |
| 結果 |
AC
|
| 実行時間 | 341 ms / 2,000 ms |
| + 15µs | |
| コード長 | 431 bytes |
| 記録 | |
| コンパイル時間 | 5 ms |
| コンパイル使用メモリ | 9,264 KB |
| 実行使用メモリ | 21,528 KB |
| 最終ジャッジ日時 | 2026-07-13 00:33:45 |
| 合計ジャッジ時間 | 7,061 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 18 |
ソースコード
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 mod = 998244353
local n = io.read("*n", "*l")
local str = io.read()
local t = {}
for w in str:gmatch("%d+") do
table.insert(t, lltonumber(w))
end
table.sort(t)
local ans = 0LL
for i = 1, n do
ans = (ans * 10LL + t[i]) % mod
end
ans = tostring(ans):gsub("LL", "")
print(ans)