結果

問題 No.2252 Find Zero
ユーザー shobonvipshobonvip
提出日時 2023-01-19 22:32:10
言語 PyPy3
(7.3.15)
結果
RE  
(最新)
AC  
(最初)
実行時間 -
コード長 230 bytes
コンパイル時間 643 ms
コンパイル使用メモリ 87,100 KB
実行使用メモリ 95,464 KB
平均クエリ数 78.17
最終ジャッジ日時 2023-09-04 18:20:42
合計ジャッジ時間 5,199 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 AC 110 ms
86,892 KB
testcase_03 AC 127 ms
87,436 KB
testcase_04 AC 111 ms
87,172 KB
testcase_05 AC 109 ms
87,268 KB
testcase_06 AC 110 ms
87,732 KB
testcase_07 AC 112 ms
86,932 KB
testcase_08 AC 127 ms
87,468 KB
testcase_09 AC 135 ms
87,280 KB
testcase_10 AC 110 ms
87,428 KB
testcase_11 AC 109 ms
87,196 KB
testcase_12 RE -
testcase_13 AC 110 ms
87,184 KB
testcase_14 AC 114 ms
87,200 KB
testcase_15 RE -
testcase_16 AC 108 ms
87,152 KB
testcase_17 AC 109 ms
87,704 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
now = 0
while True:
	print(f"? {now} {now + 1}")
	x = int(input())
	if x == now:
		print(f"! {now + 1}")
		exit()
	if x == now + 1:
		print(f"! {now}")
		exit()
	if now == n-1:
		print(f"! {n}")
		exit()
	now += 2
0