結果

問題 No.653 E869120 and Lucky Numbers
ユーザー 👑 obakyanobakyan
提出日時 2019-06-11 23:24:16
言語 Lua
(LuaJit 2.1.1696795921)
結果
WA  
実行時間 -
コード長 381 bytes
コンパイル時間 87 ms
コンパイル使用メモリ 5,376 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-16 20:39:15
合計ジャッジ時間 1,097 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

local str = io.read()
local n = #str
local t = {}
for i = 1, n do
  t[i] = tonumber(str:sub(n + 1 - i, n + 1 - i))
end
local ret = true
for i = 1, n - 1 do
  if 2 <= t[i] and t[i] <= 4 then
    t[i + 1] = t[i + 1] - 1
  else
    ret = false
    break
  end
end
if ret then
  if t[n] == 0 or t[n] == 6 or t[n] == 7 then
  else
    ret = false
  end
end
print(ret and "Yes" or "No")
0