結果

問題 No.2063 ±2^k operations (easy)
ユーザー zncudzncud
提出日時 2022-09-25 21:27:37
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 413 bytes
コンパイル時間 99 ms
コンパイル使用メモリ 10,560 KB
実行使用メモリ 8,472 KB
最終ジャッジ日時 2023-08-24 02:01:31
合計ジャッジ時間 1,633 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 16 ms
7,948 KB
testcase_02 AC 15 ms
7,824 KB
testcase_03 AC 15 ms
7,780 KB
testcase_04 AC 16 ms
7,780 KB
testcase_05 AC 15 ms
7,932 KB
testcase_06 AC 15 ms
7,828 KB
testcase_07 AC 15 ms
7,772 KB
testcase_08 AC 15 ms
7,844 KB
testcase_09 AC 16 ms
7,944 KB
testcase_10 AC 15 ms
7,828 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 15 ms
7,852 KB
testcase_14 WA -
testcase_15 AC 15 ms
7,792 KB
testcase_16 WA -
testcase_17 AC 55 ms
8,316 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 56 ms
8,264 KB
testcase_21 AC 52 ms
8,376 KB
testcase_22 AC 15 ms
8,216 KB
testcase_23 AC 16 ms
8,264 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def solve_a():
    n = str(input())
    cnt = 0
    flag = False
    for i in range(len(n)):
        if int(n[i]) == 1:
            cnt += 1
            if flag:
                print('No')
                return
        if int(n[i]) == 0:
            flag = True
    if cnt == 2:
        print('Yes')
    elif cnt == 1:
        print('No')
    else:
        print('Yes')

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