結果

問題 No.2063 ±2^k operations (easy)
ユーザー ShirotsumeShirotsume
提出日時 2022-09-02 22:32:49
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 207 ms / 2,000 ms
コード長 405 bytes
コンパイル時間 533 ms
コンパイル使用メモリ 87,108 KB
実行使用メモリ 80,020 KB
最終ジャッジ日時 2023-08-10 04:48:37
合計ジャッジ時間 3,535 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
71,284 KB
testcase_01 AC 69 ms
71,484 KB
testcase_02 AC 72 ms
71,156 KB
testcase_03 AC 67 ms
71,492 KB
testcase_04 AC 67 ms
71,512 KB
testcase_05 AC 67 ms
71,292 KB
testcase_06 AC 65 ms
71,444 KB
testcase_07 AC 67 ms
71,404 KB
testcase_08 AC 66 ms
71,304 KB
testcase_09 AC 65 ms
71,460 KB
testcase_10 AC 66 ms
71,148 KB
testcase_11 AC 68 ms
71,452 KB
testcase_12 AC 68 ms
71,456 KB
testcase_13 AC 68 ms
71,280 KB
testcase_14 AC 67 ms
71,280 KB
testcase_15 AC 68 ms
71,296 KB
testcase_16 AC 70 ms
71,392 KB
testcase_17 AC 70 ms
75,880 KB
testcase_18 AC 74 ms
75,956 KB
testcase_19 AC 71 ms
75,904 KB
testcase_20 AC 73 ms
75,896 KB
testcase_21 AC 71 ms
76,064 KB
testcase_22 AC 207 ms
80,020 KB
testcase_23 AC 199 ms
79,888 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = lambda: sys.stdin.readline().rstrip()
ii = lambda: int(input())
mi = lambda: map(int, input().split())
li = lambda: list(mi())
inf = 2 ** 63 - 1
mod = 998244353

n = input()

ans = 'No'

if n.count('1') == 2:
    ans = 'Yes'
n += '#'
x = ''
for i in range(len(n) - 1):
    if n[i] != n[i+1]:
        x += n[i]

if n.count('1') > 1 and (x == '10' or x == '1'):
    ans = 'Yes'
print(ans)
0