結果
問題 | No.2063 ±2^k operations (easy) |
ユーザー |
👑 |
提出日時 | 2022-09-09 12:48:42 |
言語 | Lua (LuaJit 2.1.1734355927) |
結果 |
AC
|
実行時間 | 5 ms / 2,000 ms |
コード長 | 401 bytes |
コンパイル時間 | 131 ms |
コンパイル使用メモリ | 6,824 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-25 09:31:47 |
合計ジャッジ時間 | 1,053 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 |
ソースコード
local s = io.read() .. "0"local t = {}local spos = falsefor i = 1, #s doif s:byte(i) - 48 == 1 thenif not spos then spos = i endtpos = ielseif spos thentable.insert(t, tpos - spos + 1)spos = falseendendendif #t == 1 thenprint(1 < t[1] and "Yes" or "No")elseif #t == 2 thenprint((1 == t[1] and 1 == t[2]) and "Yes" or "No")elseprint("No")end