結果

問題 No.2252 Find Zero
ユーザー shobonvipshobonvip
提出日時 2023-01-19 22:30:27
言語 PyPy3
(7.3.15)
結果
RE  
(最新)
AC  
(最初)
実行時間 -
コード長 242 bytes
コンパイル時間 1,193 ms
コンパイル使用メモリ 86,632 KB
実行使用メモリ 95,696 KB
平均クエリ数 105.72
最終ジャッジ日時 2023-09-04 16:49:37
合計ジャッジ時間 5,150 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 130 ms
86,664 KB
testcase_01 AC 157 ms
91,368 KB
testcase_02 RE -
testcase_03 AC 137 ms
87,356 KB
testcase_04 AC 122 ms
86,716 KB
testcase_05 AC 121 ms
86,960 KB
testcase_06 AC 118 ms
86,932 KB
testcase_07 AC 119 ms
87,144 KB
testcase_08 AC 132 ms
87,204 KB
testcase_09 AC 138 ms
87,444 KB
testcase_10 RE -
testcase_11 AC 117 ms
87,080 KB
testcase_12 AC 115 ms
87,136 KB
testcase_13 AC 114 ms
86,944 KB
testcase_14 RE -
testcase_15 AC 115 ms
87,256 KB
testcase_16 AC 117 ms
87,504 KB
testcase_17 AC 118 ms
87,196 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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