結果

問題 No.2063 ±2^k operations (easy)
ユーザー Inoue hayateInoue hayate
提出日時 2022-09-17 04:45:21
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 438 bytes
コンパイル時間 270 ms
コンパイル使用メモリ 87,260 KB
実行使用メモリ 71,440 KB
最終ジャッジ日時 2023-08-23 17:26:14
合計ジャッジ時間 3,039 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
71,036 KB
testcase_01 AC 70 ms
71,260 KB
testcase_02 AC 71 ms
70,868 KB
testcase_03 WA -
testcase_04 AC 72 ms
71,076 KB
testcase_05 AC 69 ms
71,076 KB
testcase_06 AC 71 ms
71,156 KB
testcase_07 AC 72 ms
70,708 KB
testcase_08 AC 73 ms
70,912 KB
testcase_09 AC 71 ms
70,932 KB
testcase_10 AC 70 ms
70,972 KB
testcase_11 AC 71 ms
71,084 KB
testcase_12 AC 70 ms
71,132 KB
testcase_13 AC 70 ms
70,948 KB
testcase_14 AC 71 ms
70,872 KB
testcase_15 AC 70 ms
70,912 KB
testcase_16 AC 71 ms
71,072 KB
testcase_17 AC 72 ms
71,036 KB
testcase_18 AC 71 ms
71,128 KB
testcase_19 AC 69 ms
70,872 KB
testcase_20 AC 70 ms
70,980 KB
testcase_21 AC 69 ms
70,900 KB
testcase_22 AC 69 ms
71,080 KB
testcase_23 AC 70 ms
71,060 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = input()

if n[len(n)-1] == "1":
    n = n[0:len(n)-1] + "0"
    count = n.count("1")
    if count == 1 or n.count("1") == len(n)-1:
        print("Yes")
    else:
        print("No")
else:
    if n.count("1") == 2:
        print("Yes")
    else:
        index = n.find("0")
        if n[0:index].count("0") == 0 and n.count("1") >= 2 and n[index:len(n)].count("1") == 0:
            print("Yes")
        else:
            print("No")
0