結果

問題 No.2063 ±2^k operations (easy)
ユーザー shobonvipshobonvip
提出日時 2022-09-02 21:38:25
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 75 ms / 2,000 ms
コード長 291 bytes
コンパイル時間 526 ms
コンパイル使用メモリ 87,312 KB
実行使用メモリ 75,916 KB
最終ジャッジ日時 2023-08-10 03:33:10
合計ジャッジ時間 3,714 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 66 ms
71,116 KB
testcase_01 AC 66 ms
71,276 KB
testcase_02 AC 73 ms
71,268 KB
testcase_03 AC 72 ms
71,308 KB
testcase_04 AC 68 ms
71,376 KB
testcase_05 AC 68 ms
71,436 KB
testcase_06 AC 66 ms
71,652 KB
testcase_07 AC 67 ms
71,544 KB
testcase_08 AC 67 ms
71,300 KB
testcase_09 AC 65 ms
71,112 KB
testcase_10 AC 67 ms
71,300 KB
testcase_11 AC 69 ms
71,260 KB
testcase_12 AC 69 ms
71,544 KB
testcase_13 AC 69 ms
71,328 KB
testcase_14 AC 71 ms
71,304 KB
testcase_15 AC 67 ms
71,296 KB
testcase_16 AC 67 ms
71,408 KB
testcase_17 AC 70 ms
75,892 KB
testcase_18 AC 69 ms
75,908 KB
testcase_19 AC 72 ms
75,852 KB
testcase_20 AC 73 ms
75,760 KB
testcase_21 AC 73 ms
75,784 KB
testcase_22 AC 73 ms
75,916 KB
testcase_23 AC 75 ms
75,888 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