結果

問題 No.2063 ±2^k operations (easy)
ユーザー rlangevin
提出日時 2024-11-26 12:13:58
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 47 ms / 2,000 ms
コード長 371 bytes
コンパイル時間 142 ms
コンパイル使用メモリ 81,924 KB
実行使用メモリ 63,692 KB
最終ジャッジ日時 2024-11-26 12:14:03
合計ジャッジ時間 1,912 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

N = ["0"] + list(input())
if N.count("1") == 1:
    print("No")
    exit()
if N.count("1") == 2:
    print("Yes")
    exit()
 
flag = 0
flag2 = 0
for i in range(len(N) - 1):
    if N[i] == "0" and N[i + 1] == "1":
        flag = 1
        if flag2:
            print("No")
            exit()
    if N[i] == "1" and N[i + 1] == "0" and flag:
        flag2 = 1
print("Yes")
0