結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,064 KB
testcase_01 AC 70 ms
70,932 KB
testcase_02 AC 71 ms
71,136 KB
testcase_03 WA -
testcase_04 AC 72 ms
70,956 KB
testcase_05 AC 70 ms
70,940 KB
testcase_06 AC 70 ms
71,076 KB
testcase_07 AC 70 ms
71,116 KB
testcase_08 AC 68 ms
70,712 KB
testcase_09 AC 69 ms
70,984 KB
testcase_10 AC 69 ms
70,936 KB
testcase_11 AC 69 ms
71,136 KB
testcase_12 AC 68 ms
70,904 KB
testcase_13 AC 69 ms
71,040 KB
testcase_14 AC 70 ms
70,932 KB
testcase_15 WA -
testcase_16 AC 70 ms
70,912 KB
testcase_17 AC 71 ms
71,140 KB
testcase_18 AC 70 ms
71,040 KB
testcase_19 AC 72 ms
71,136 KB
testcase_20 AC 72 ms
70,992 KB
testcase_21 AC 74 ms
71,192 KB
testcase_22 WA -
testcase_23 AC 71 ms
71,028 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:
            print("Yes")
        else:
            print("No")
0