結果

問題 No.2063 ±2^k operations (easy)
ユーザー aaaaaaaaaa2230aaaaaaaaaa2230
提出日時 2022-09-02 22:02:56
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 78 ms / 2,000 ms
コード長 242 bytes
コンパイル時間 412 ms
コンパイル使用メモリ 87,144 KB
実行使用メモリ 75,864 KB
最終ジャッジ日時 2023-08-10 04:05:10
合計ジャッジ時間 3,678 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,192 KB
testcase_01 AC 69 ms
71,324 KB
testcase_02 AC 72 ms
71,044 KB
testcase_03 AC 69 ms
71,460 KB
testcase_04 AC 70 ms
71,176 KB
testcase_05 AC 70 ms
71,196 KB
testcase_06 AC 70 ms
71,192 KB
testcase_07 AC 70 ms
71,304 KB
testcase_08 AC 69 ms
71,292 KB
testcase_09 AC 70 ms
71,448 KB
testcase_10 AC 69 ms
71,156 KB
testcase_11 AC 69 ms
71,148 KB
testcase_12 AC 71 ms
71,012 KB
testcase_13 AC 70 ms
71,488 KB
testcase_14 AC 70 ms
71,216 KB
testcase_15 AC 69 ms
71,152 KB
testcase_16 AC 70 ms
71,336 KB
testcase_17 AC 70 ms
71,040 KB
testcase_18 AC 69 ms
71,272 KB
testcase_19 AC 69 ms
71,284 KB
testcase_20 AC 69 ms
71,240 KB
testcase_21 AC 77 ms
75,864 KB
testcase_22 AC 78 ms
75,784 KB
testcase_23 AC 77 ms
75,624 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