結果

問題 No.313 π
ユーザー 👑 obakyanobakyan
提出日時 2019-04-21 14:45:06
言語 Lua
(LuaJit 2.1.1696795921)
結果
AC  
実行時間 14 ms / 5,000 ms
コード長 452 bytes
コンパイル時間 130 ms
コンパイル使用メモリ 5,120 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-15 16:58:50
合計ジャッジ時間 1,836 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 8 ms
5,248 KB
testcase_01 AC 8 ms
5,248 KB
testcase_02 AC 8 ms
5,376 KB
testcase_03 AC 13 ms
5,376 KB
testcase_04 AC 14 ms
5,376 KB
testcase_05 AC 14 ms
5,376 KB
testcase_06 AC 8 ms
5,376 KB
testcase_07 AC 8 ms
5,376 KB
testcase_08 AC 8 ms
5,376 KB
testcase_09 AC 8 ms
5,376 KB
testcase_10 AC 8 ms
5,376 KB
testcase_11 AC 8 ms
5,376 KB
testcase_12 AC 8 ms
5,376 KB
testcase_13 AC 8 ms
5,376 KB
testcase_14 AC 8 ms
5,376 KB
testcase_15 AC 8 ms
5,376 KB
testcase_16 AC 8 ms
5,376 KB
testcase_17 AC 8 ms
5,376 KB
testcase_18 AC 8 ms
5,376 KB
testcase_19 AC 8 ms
5,376 KB
testcase_20 AC 9 ms
5,376 KB
testcase_21 AC 8 ms
5,376 KB
testcase_22 AC 8 ms
5,376 KB
testcase_23 AC 8 ms
5,376 KB
testcase_24 AC 8 ms
5,376 KB
testcase_25 AC 8 ms
5,376 KB
testcase_26 AC 8 ms
5,376 KB
testcase_27 AC 8 ms
5,376 KB
testcase_28 AC 8 ms
5,376 KB
testcase_29 AC 8 ms
5,376 KB
testcase_30 AC 8 ms
5,376 KB
testcase_31 AC 8 ms
5,376 KB
testcase_32 AC 8 ms
5,376 KB
testcase_33 AC 8 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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)
0