結果

問題 No.2063 ±2^k operations (easy)
ユーザー kozykozy
提出日時 2022-09-02 21:23:25
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 83 ms / 2,000 ms
コード長 220 bytes
コンパイル時間 347 ms
コンパイル使用メモリ 87,172 KB
実行使用メモリ 75,864 KB
最終ジャッジ日時 2023-08-10 03:11:56
合計ジャッジ時間 3,300 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
71,132 KB
testcase_01 AC 73 ms
71,228 KB
testcase_02 AC 74 ms
71,272 KB
testcase_03 AC 76 ms
71,508 KB
testcase_04 AC 75 ms
71,432 KB
testcase_05 AC 74 ms
71,376 KB
testcase_06 AC 73 ms
71,616 KB
testcase_07 AC 75 ms
71,444 KB
testcase_08 AC 74 ms
71,352 KB
testcase_09 AC 75 ms
71,368 KB
testcase_10 AC 73 ms
71,620 KB
testcase_11 AC 74 ms
71,368 KB
testcase_12 AC 74 ms
71,180 KB
testcase_13 AC 75 ms
71,616 KB
testcase_14 AC 74 ms
71,128 KB
testcase_15 AC 74 ms
71,464 KB
testcase_16 AC 74 ms
71,372 KB
testcase_17 AC 74 ms
71,368 KB
testcase_18 AC 74 ms
71,388 KB
testcase_19 AC 75 ms
71,516 KB
testcase_20 AC 74 ms
71,448 KB
testcase_21 AC 81 ms
75,776 KB
testcase_22 AC 83 ms
75,636 KB
testcase_23 AC 82 ms
75,864 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

S=input()
if S.count("1")<=1:
  print("No")
  exit()
if S.count("1")<=2:
  print("Yes")
  exit()
S="0"+S
k=0
for i in range(len(S)-1):
  if S[i]=="0" and S[i+1]=="1":
    k+=1
if k<=1:
  print("Yes")
  exit()
print("No")
0