結果
問題 |
No.582 キャンディー・ボックス3
|
ユーザー |
👑 |
提出日時 | 2019-04-30 13:57:46 |
言語 | Lua (LuaJit 2.1.1734355927) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 291 bytes |
コンパイル時間 | 660 ms |
コンパイル使用メモリ | 5,248 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-29 22:40:51 |
合計ジャッジ時間 | 1,752 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 17 |
ソースコード
local ior = io.input() local n = ior:read("*n") local tot = 0 local b2 = 0 local b3 = false for i = 1, n do local c = ior:read("*n") tot = tot + c if(c == 2) then b2 = b2 + 1 elseif(3 <= c) then b3 = true end end if(tot % 2 == 0 or b3 or 2 <= b2) then print("B") else print("A") end