結果
問題 |
No.549 素材合成システム
|
ユーザー |
👑 |
提出日時 | 2019-04-30 14:38:39 |
言語 | Lua (LuaJit 2.1.1734355927) |
結果 |
AC
|
実行時間 | 70 ms / 2,000 ms |
コード長 | 220 bytes |
コンパイル時間 | 136 ms |
コンパイル使用メモリ | 6,688 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-29 23:25:20 |
合計ジャッジ時間 | 4,250 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 44 |
ソースコード
local ior = io.input() local n = ior:read("*n") local t = {} for i = 1, n do t[i] = ior:read("*n") end table.sort(t) local sum = 0 for i = 1, n - 1 do sum = sum + math.floor(t[i] / 2) end sum = sum + t[n] print(sum)