結果

問題 No.2063 ±2^k operations (easy)
ユーザー shobonvipshobonvip
提出日時 2022-09-02 21:38:25
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 45 ms / 2,000 ms
コード長 291 bytes
コンパイル時間 308 ms
コンパイル使用メモリ 82,308 KB
実行使用メモリ 59,716 KB
最終ジャッジ日時 2024-04-27 21:06:08
合計ジャッジ時間 2,123 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
52,244 KB
testcase_01 AC 39 ms
51,812 KB
testcase_02 AC 39 ms
52,448 KB
testcase_03 AC 38 ms
53,492 KB
testcase_04 AC 38 ms
52,140 KB
testcase_05 AC 38 ms
52,860 KB
testcase_06 AC 39 ms
52,444 KB
testcase_07 AC 38 ms
52,408 KB
testcase_08 AC 38 ms
51,956 KB
testcase_09 AC 38 ms
53,556 KB
testcase_10 AC 38 ms
52,752 KB
testcase_11 AC 39 ms
53,168 KB
testcase_12 AC 37 ms
52,544 KB
testcase_13 AC 38 ms
53,044 KB
testcase_14 AC 38 ms
52,036 KB
testcase_15 AC 38 ms
51,908 KB
testcase_16 AC 39 ms
52,408 KB
testcase_17 AC 43 ms
58,956 KB
testcase_18 AC 43 ms
59,380 KB
testcase_19 AC 44 ms
59,184 KB
testcase_20 AC 43 ms
59,060 KB
testcase_21 AC 43 ms
59,716 KB
testcase_22 AC 44 ms
59,624 KB
testcase_23 AC 45 ms
59,220 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = input()

type = 1
cnt = 0
v = 0
mode = 1
for i in range(len(n)):
	if type == 1 and n[i] == "0":
		type = 0
	elif type == 0 and n[i] == "1":
		mode = 0
	if n[i] == "1":
		cnt += 1

#print(cnt, type, mode)

if mode and cnt > 1:
	print("Yes")
elif cnt == 2:
	print("Yes")
else:
	print("No")
0