結果

問題 No.2063 ±2^k operations (easy)
ユーザー tamatotamato
提出日時 2022-09-02 21:23:41
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 44 ms / 2,000 ms
コード長 496 bytes
コンパイル時間 193 ms
コンパイル使用メモリ 82,160 KB
実行使用メモリ 64,068 KB
最終ジャッジ日時 2024-04-27 20:47:07
合計ジャッジ時間 1,924 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
52,348 KB
testcase_01 AC 38 ms
53,148 KB
testcase_02 AC 38 ms
53,032 KB
testcase_03 AC 37 ms
52,924 KB
testcase_04 AC 39 ms
53,756 KB
testcase_05 AC 38 ms
53,564 KB
testcase_06 AC 38 ms
52,472 KB
testcase_07 AC 38 ms
52,360 KB
testcase_08 AC 38 ms
53,296 KB
testcase_09 AC 38 ms
52,236 KB
testcase_10 AC 38 ms
52,964 KB
testcase_11 AC 38 ms
52,440 KB
testcase_12 AC 38 ms
53,076 KB
testcase_13 AC 38 ms
52,904 KB
testcase_14 AC 38 ms
51,936 KB
testcase_15 AC 39 ms
52,140 KB
testcase_16 AC 38 ms
51,700 KB
testcase_17 AC 38 ms
52,448 KB
testcase_18 AC 38 ms
52,824 KB
testcase_19 AC 39 ms
52,552 KB
testcase_20 AC 40 ms
54,376 KB
testcase_21 AC 44 ms
64,068 KB
testcase_22 AC 38 ms
53,552 KB
testcase_23 AC 39 ms
53,856 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