結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
70,904 KB
testcase_01 WA -
testcase_02 AC 66 ms
70,972 KB
testcase_03 AC 70 ms
70,712 KB
testcase_04 AC 72 ms
70,920 KB
testcase_05 AC 66 ms
70,912 KB
testcase_06 AC 68 ms
71,000 KB
testcase_07 AC 67 ms
70,940 KB
testcase_08 AC 67 ms
71,092 KB
testcase_09 AC 68 ms
71,132 KB
testcase_10 AC 68 ms
71,080 KB
testcase_11 AC 67 ms
71,092 KB
testcase_12 AC 68 ms
71,096 KB
testcase_13 WA -
testcase_14 AC 69 ms
70,712 KB
testcase_15 AC 69 ms
70,976 KB
testcase_16 AC 67 ms
71,132 KB
testcase_17 AC 68 ms
71,076 KB
testcase_18 AC 69 ms
71,016 KB
testcase_19 AC 68 ms
71,076 KB
testcase_20 AC 67 ms
70,908 KB
testcase_21 WA -
testcase_22 AC 68 ms
70,988 KB
testcase_23 AC 67 ms
70,904 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = input()

if n[len(n)-1] == "1":
    n = n[0:len(n)-1] + "0"
    count = n.count("1")
    if count == 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 & n.count("1") >= 2:
            print("Yes")
        else:
            print("No")
0