結果

問題 No.2063 ±2^k operations (easy)
コンテスト
ユーザー flygon
提出日時 2022-09-15 22:41:44
言語 PyPy3
(8.0.0 + ACL)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 36 ms / 2,000 ms
+ 446µs
コード長 306 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 75 ms
コンパイル使用メモリ 81,024 KB
実行使用メモリ 76,800 KB
最終ジャッジ日時 2026-10-11 00:15:07
合計ジャッジ時間 2,222 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

n = input()
x = []
cnt = 0
for i,c in enumerate(n):
  if c == "1": cnt += 1
  if i == 0:
    x.append(c)
  else:
    if n[i-1] == c: continue
    else:
      x.append(x)

if cnt == 1: print("No")
elif cnt == 2: print("Yes")
elif len(x) == 1:print('Yes')
elif len(x) == 2:
  print('Yes')
else:
  print('No')
0