結果

問題 No.2063 ±2^k operations (easy)
ユーザー kozykozy
提出日時 2022-09-02 21:23:25
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 46 ms / 2,000 ms
コード長 220 bytes
コンパイル時間 277 ms
コンパイル使用メモリ 82,208 KB
実行使用メモリ 60,376 KB
最終ジャッジ日時 2024-04-27 20:46:47
合計ジャッジ時間 1,941 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
52,696 KB
testcase_01 AC 38 ms
52,500 KB
testcase_02 AC 37 ms
53,360 KB
testcase_03 AC 38 ms
52,360 KB
testcase_04 AC 37 ms
52,756 KB
testcase_05 AC 38 ms
52,596 KB
testcase_06 AC 38 ms
52,300 KB
testcase_07 AC 38 ms
52,676 KB
testcase_08 AC 38 ms
52,884 KB
testcase_09 AC 38 ms
52,272 KB
testcase_10 AC 38 ms
52,124 KB
testcase_11 AC 38 ms
51,872 KB
testcase_12 AC 38 ms
52,672 KB
testcase_13 AC 37 ms
52,824 KB
testcase_14 AC 39 ms
52,440 KB
testcase_15 AC 37 ms
52,224 KB
testcase_16 AC 38 ms
53,916 KB
testcase_17 AC 36 ms
52,612 KB
testcase_18 AC 39 ms
52,396 KB
testcase_19 AC 37 ms
52,528 KB
testcase_20 AC 38 ms
53,100 KB
testcase_21 AC 46 ms
60,216 KB
testcase_22 AC 45 ms
59,712 KB
testcase_23 AC 45 ms
60,376 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