結果

問題 No.2063 ±2^k operations (easy)
ユーザー ShirotsumeShirotsume
提出日時 2022-09-02 22:29:52
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 406 bytes
コンパイル時間 140 ms
コンパイル使用メモリ 82,644 KB
実行使用メモリ 78,588 KB
最終ジャッジ日時 2024-04-27 22:05:57
合計ジャッジ時間 2,014 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,032 KB
testcase_01 AC 36 ms
52,580 KB
testcase_02 AC 35 ms
52,336 KB
testcase_03 AC 36 ms
52,904 KB
testcase_04 AC 34 ms
52,996 KB
testcase_05 AC 34 ms
52,124 KB
testcase_06 AC 34 ms
52,768 KB
testcase_07 AC 34 ms
52,448 KB
testcase_08 AC 33 ms
52,332 KB
testcase_09 AC 35 ms
52,268 KB
testcase_10 AC 36 ms
53,036 KB
testcase_11 AC 34 ms
52,252 KB
testcase_12 AC 38 ms
52,540 KB
testcase_13 WA -
testcase_14 AC 34 ms
52,952 KB
testcase_15 AC 34 ms
52,164 KB
testcase_16 AC 34 ms
53,564 KB
testcase_17 AC 41 ms
62,460 KB
testcase_18 AC 42 ms
61,660 KB
testcase_19 AC 41 ms
61,840 KB
testcase_20 AC 40 ms
62,264 KB
testcase_21 AC 41 ms
61,996 KB
testcase_22 AC 158 ms
78,580 KB
testcase_23 AC 153 ms
78,588 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 == '01'):
    ans = 'Yes'
print(ans)
0