結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
70,920 KB
testcase_01 AC 70 ms
71,012 KB
testcase_02 AC 71 ms
70,992 KB
testcase_03 AC 70 ms
71,060 KB
testcase_04 AC 73 ms
70,820 KB
testcase_05 AC 70 ms
71,136 KB
testcase_06 AC 71 ms
71,072 KB
testcase_07 AC 71 ms
71,032 KB
testcase_08 AC 70 ms
70,952 KB
testcase_09 AC 69 ms
70,928 KB
testcase_10 AC 71 ms
71,032 KB
testcase_11 AC 71 ms
70,936 KB
testcase_12 AC 71 ms
70,916 KB
testcase_13 WA -
testcase_14 AC 70 ms
70,868 KB
testcase_15 WA -
testcase_16 AC 71 ms
70,900 KB
testcase_17 AC 70 ms
70,900 KB
testcase_18 AC 71 ms
70,988 KB
testcase_19 AC 69 ms
70,956 KB
testcase_20 AC 71 ms
71,068 KB
testcase_21 AC 72 ms
71,044 KB
testcase_22 WA -
testcase_23 AC 72 ms
70,708 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 and n.count("1") >= 2:
            print("Yes")
        else:
            print("No")
0