結果
| 問題 | No.2063 ±2^k operations (easy) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-09-09 12:48:42 |
| 言語 | Lua (LuaJit 2.1.1791890110) |
| 結果 |
AC
不安定
|
| 実行時間 | 3 ms / 2,000 ms |
| + 539µs | |
| コード長 | 401 bytes |
| 記録 | |
| コンパイル時間 | 38 ms |
| コンパイル使用メモリ | 9,816 KB |
| 実行使用メモリ | 9,860 KB |
| 最終ジャッジ日時 | 2026-10-11 00:14:24 |
| 合計ジャッジ時間 | 1,433 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 22 |
ソースコード
local s = io.read() .. "0"
local t = {}
local spos = false
for i = 1, #s do
if s:byte(i) - 48 == 1 then
if not spos then spos = i end
tpos = i
else
if spos then
table.insert(t, tpos - spos + 1)
spos = false
end
end
end
if #t == 1 then
print(1 < t[1] and "Yes" or "No")
elseif #t == 2 then
print((1 == t[1] and 1 == t[2]) and "Yes" or "No")
else
print("No")
end