結果
| 問題 | No.653 E869120 and Lucky Numbers |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-06-11 23:24:16 |
| 言語 | Lua (LuaJit 2.1.1787165859) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 381 bytes |
| 記録 | |
| コンパイル時間 | 27 ms |
| コンパイル使用メモリ | 6,528 KB |
| 実行使用メモリ | 6,528 KB |
| 最終ジャッジ日時 | 2026-09-11 18:18:40 |
| 合計ジャッジ時間 | 1,914 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 26 WA * 5 |
ソースコード
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")