結果

問題 No.2252 Find Zero
ユーザー shobonvip
提出日時 2023-01-19 23:43:43
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 113 ms / 2,000 ms
コード長 232 bytes
コンパイル時間 131 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 77,088 KB
平均クエリ数 78.17
最終ジャッジ日時 2024-06-22 16:14:21
合計ジャッジ時間 2,789 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 18
権限があれば一括ダウンロードができます

ソースコード

diff #

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