結果
| 問題 |
No.313 π
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-04-21 14:45:06 |
| 言語 | Lua (LuaJit 2.1.1734355927) |
| 結果 |
AC
|
| 実行時間 | 12 ms / 5,000 ms |
| コード長 | 452 bytes |
| コンパイル時間 | 76 ms |
| コンパイル使用メモリ | 5,120 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-05 17:43:57 |
| 合計ジャッジ時間 | 1,427 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 32 |
ソースコード
t = {}
t[0] = 20104
t[1] = 20063
t[2] = 19892
t[3] = 20011
t[4] = 19874
t[5] = 20199
t[6] = 19898
t[7] = 20163
t[8] = 19956
t[9] = 19841
local str = io.read()
local t2 = {}
for i = 1, #str do
local b = str:sub(i, i)
if(b ~= ".") then
b = tonumber(b)
if(t2[b] == nil) then t2[b] = 1 else t2[b] = t2[b] + 1 end
end
end
local x, y
for i = 0, 9 do
if(t[i] < t2[i]) then x = i
elseif(t2[i] < t[i]) then y = i end
end
print(x .. " " .. y)