結果

問題 No.2063 ±2^k operations (easy)
ユーザー aaaaaaaaaa2230aaaaaaaaaa2230
提出日時 2022-09-02 22:02:56
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 49 ms / 2,000 ms
コード長 242 bytes
コンパイル時間 296 ms
コンパイル使用メモリ 82,232 KB
実行使用メモリ 72,128 KB
最終ジャッジ日時 2024-04-27 21:37:11
合計ジャッジ時間 2,096 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
52,080 KB
testcase_01 AC 38 ms
51,748 KB
testcase_02 AC 38 ms
51,944 KB
testcase_03 AC 37 ms
52,560 KB
testcase_04 AC 39 ms
51,696 KB
testcase_05 AC 38 ms
52,084 KB
testcase_06 AC 38 ms
52,268 KB
testcase_07 AC 38 ms
52,048 KB
testcase_08 AC 40 ms
52,696 KB
testcase_09 AC 39 ms
52,204 KB
testcase_10 AC 38 ms
52,428 KB
testcase_11 AC 38 ms
52,080 KB
testcase_12 AC 38 ms
52,080 KB
testcase_13 AC 38 ms
51,880 KB
testcase_14 AC 38 ms
53,560 KB
testcase_15 AC 38 ms
52,820 KB
testcase_16 AC 39 ms
52,540 KB
testcase_17 AC 39 ms
53,224 KB
testcase_18 AC 38 ms
52,444 KB
testcase_19 AC 38 ms
52,548 KB
testcase_20 AC 39 ms
53,360 KB
testcase_21 AC 47 ms
65,532 KB
testcase_22 AC 49 ms
72,128 KB
testcase_23 AC 48 ms
71,900 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = input()
c = n.count("1")
if c == 1:
    print("No")
elif c == 2:
    print("Yes")
else:
    num = 0
    for a,na in zip(n,n[1:]):
        if a != na:
            num += 1
    if num <= 1:
        print("Yes")
    else:
        print("No")
0