結果

問題 No.2063 ±2^k operations (easy)
ユーザー 👑 tamatotamato
提出日時 2022-09-02 21:23:41
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 81 ms / 2,000 ms
コード長 496 bytes
コンパイル時間 338 ms
コンパイル使用メモリ 86,924 KB
実行使用メモリ 75,420 KB
最終ジャッジ日時 2023-08-10 03:12:19
合計ジャッジ時間 3,441 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,332 KB
testcase_01 AC 74 ms
71,464 KB
testcase_02 AC 75 ms
71,424 KB
testcase_03 AC 73 ms
71,372 KB
testcase_04 AC 74 ms
71,392 KB
testcase_05 AC 75 ms
71,608 KB
testcase_06 AC 75 ms
71,372 KB
testcase_07 AC 75 ms
71,324 KB
testcase_08 AC 76 ms
71,280 KB
testcase_09 AC 76 ms
71,324 KB
testcase_10 AC 78 ms
71,376 KB
testcase_11 AC 74 ms
71,472 KB
testcase_12 AC 75 ms
71,452 KB
testcase_13 AC 77 ms
71,368 KB
testcase_14 AC 77 ms
71,612 KB
testcase_15 AC 77 ms
71,364 KB
testcase_16 AC 76 ms
71,372 KB
testcase_17 AC 75 ms
71,328 KB
testcase_18 AC 76 ms
71,284 KB
testcase_19 AC 76 ms
71,380 KB
testcase_20 AC 77 ms
71,224 KB
testcase_21 AC 81 ms
75,420 KB
testcase_22 AC 76 ms
71,656 KB
testcase_23 AC 75 ms
71,104 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

mod = 998244353


def main():
    import sys
    input = sys.stdin.readline

    N = input().rstrip('\n')

    x = N.count("1")
    if x == 1:
        print("No")
    elif x == 2:
        print("Yes")
    else:
        flg = 0
        for n in N:
            if n == "0":
                if flg == 0:
                    flg = 1
            else:
                if flg == 1:
                    print("No")
                    exit()
        print("Yes")


if __name__ == '__main__':
    main()
0