結果

問題 No.2063 ±2^k operations (easy)
ユーザー tamato
提出日時 2022-09-02 21:23:41
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 41 ms / 2,000 ms
コード長 496 bytes
コンパイル時間 211 ms
コンパイル使用メモリ 82,264 KB
実行使用メモリ 62,448 KB
最終ジャッジ日時 2024-11-16 02:12:02
合計ジャッジ時間 1,876 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

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