結果

問題 No.2063 ±2^k operations (easy)
ユーザー ShirotsumeShirotsume
提出日時 2022-09-02 22:32:49
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 212 ms / 2,000 ms
コード長 405 bytes
コンパイル時間 395 ms
コンパイル使用メモリ 81,880 KB
実行使用メモリ 79,116 KB
最終ジャッジ日時 2024-04-27 22:08:49
合計ジャッジ時間 2,425 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
52,360 KB
testcase_01 AC 41 ms
52,484 KB
testcase_02 AC 40 ms
53,048 KB
testcase_03 AC 39 ms
52,692 KB
testcase_04 AC 38 ms
53,064 KB
testcase_05 AC 41 ms
52,740 KB
testcase_06 AC 39 ms
53,556 KB
testcase_07 AC 39 ms
51,700 KB
testcase_08 AC 39 ms
53,216 KB
testcase_09 AC 40 ms
52,280 KB
testcase_10 AC 39 ms
52,060 KB
testcase_11 AC 39 ms
52,332 KB
testcase_12 AC 38 ms
52,864 KB
testcase_13 AC 39 ms
53,292 KB
testcase_14 AC 39 ms
52,428 KB
testcase_15 AC 38 ms
52,620 KB
testcase_16 AC 39 ms
52,768 KB
testcase_17 AC 44 ms
63,544 KB
testcase_18 AC 45 ms
61,472 KB
testcase_19 AC 44 ms
61,592 KB
testcase_20 AC 44 ms
63,160 KB
testcase_21 AC 47 ms
63,080 KB
testcase_22 AC 180 ms
79,116 KB
testcase_23 AC 212 ms
78,756 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