結果
| 問題 | No.662 スロットマシーン |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-04-30 11:41:53 |
| 言語 | Lua (LuaJit 2.1.1791890110) |
| 結果 |
WA
不安定
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 668 bytes |
| 記録 | |
| コンパイル時間 | 6 ms |
| コンパイル使用メモリ | 7,856 KB |
| 実行使用メモリ | 9,920 KB |
| 最終ジャッジ日時 | 2026-10-19 13:47:25 |
| 合計ジャッジ時間 | 1,668 ms |
|
ジャッジサーバーID (参考情報) |
judge6_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 18 WA * 1 |
ソースコード
local ior = io.input()
local dic = {}
local score = {}
local cnt = {}
local len = {}
local str = ""
for i = 1, 3 do cnt[i] = {} end
for i = 1, 5 do
str = ior:read()
local name = str:match("%w+")
local num = tonumber(str:match("%d+"))
dic[name] = i
score[i] = num
for j = 1, 3 do cnt[j][i] = 0 end
end
for i = 1, 3 do
len[i] = ior:read("*n", "*l")
for j = 1, len[i] do
str = ior:read()
cnt[i][dic[str]] = cnt[i][dic[str]] + 1
end
end
local c = {}
local e = 0
for i = 1, 5 do
c[i] = 5 * cnt[1][i] * cnt[2][i] * cnt[3][i]
e = e + c[i] * score[i] / len[1] / len[2] / len[3]
end
print(string.format("%.8f", e))
for i = 1, 5 do print(c[i]) end