結果

問題 No.1198 お菓子配り-1
ユーザー 👑 obakyanobakyan
提出日時 2020-11-16 23:32:04
言語 Lua
(LuaJit 2.1.1696795921)
結果
WA  
実行時間 -
コード長 269 bytes
コンパイル時間 78 ms
コンパイル使用メモリ 5,296 KB
実行使用メモリ 4,504 KB
最終ジャッジ日時 2023-09-30 07:35:25
合計ジャッジ時間 1,164 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 RE -
testcase_02 RE -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 RE -
testcase_17 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

a = io.read()
if #a == 1 then
  a = tonumber(a)
  z = {false, false, true, false, true, false, true, true, true}
  print(a[z] and "Yes" or "No")
else
  a = tonumber(a:sub(#a - 1, #a))
  if a % 4 == 0 or a % 2 == 1 then
    print("Yes")
  else
    print("No")
  end
end
0