結果

問題 No.2063 ±2^k operations (easy)
ユーザー titiatitia
提出日時 2022-09-08 01:18:32
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 324 bytes
コンパイル時間 661 ms
コンパイル使用メモリ 10,592 KB
実行使用メモリ 8,164 KB
最終ジャッジ日時 2023-08-15 10:27:04
合計ジャッジ時間 2,987 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,908 KB
testcase_01 AC 15 ms
7,732 KB
testcase_02 AC 15 ms
7,940 KB
testcase_03 AC 15 ms
7,908 KB
testcase_04 AC 16 ms
7,924 KB
testcase_05 AC 15 ms
7,892 KB
testcase_06 AC 15 ms
7,908 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 15 ms
7,844 KB
testcase_11 AC 15 ms
7,924 KB
testcase_12 AC 15 ms
7,980 KB
testcase_13 WA -
testcase_14 AC 16 ms
7,888 KB
testcase_15 WA -
testcase_16 AC 16 ms
7,888 KB
testcase_17 AC 15 ms
8,072 KB
testcase_18 AC 16 ms
8,116 KB
testcase_19 AC 16 ms
8,164 KB
testcase_20 AC 16 ms
7,960 KB
testcase_21 AC 33 ms
7,932 KB
testcase_22 WA -
testcase_23 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

N=input()

if N.count("1")<=1:
    print("No")
    exit()

if N.count("1")==2:
    print("Yes")
    exit()

flag=0
for i in range(len(N)):
    if flag==0 and N[i]=="1":
        flag=1
    if flag==1 and N[i]=="0":
        flag=2

    if flag==2 and N[i]=="1":
        print("NO")
        exit()

if flag==2:
    print("Yes")
0