結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
7,820 KB
testcase_01 AC 16 ms
7,828 KB
testcase_02 AC 15 ms
7,780 KB
testcase_03 AC 16 ms
7,780 KB
testcase_04 AC 15 ms
7,880 KB
testcase_05 AC 15 ms
7,884 KB
testcase_06 AC 16 ms
7,812 KB
testcase_07 AC 16 ms
7,912 KB
testcase_08 AC 15 ms
7,776 KB
testcase_09 AC 15 ms
7,944 KB
testcase_10 AC 16 ms
7,756 KB
testcase_11 AC 15 ms
7,924 KB
testcase_12 AC 15 ms
7,832 KB
testcase_13 AC 16 ms
7,868 KB
testcase_14 AC 16 ms
7,784 KB
testcase_15 WA -
testcase_16 AC 16 ms
7,848 KB
testcase_17 AC 55 ms
8,344 KB
testcase_18 AC 55 ms
8,304 KB
testcase_19 AC 47 ms
8,252 KB
testcase_20 AC 55 ms
8,188 KB
testcase_21 AC 53 ms
8,244 KB
testcase_22 WA -
testcase_23 AC 60 ms
8,220 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

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