結果

問題 No.2252 Find Zero
ユーザー shobonvipshobonvip
提出日時 2023-01-19 23:43:43
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 152 ms / 2,000 ms
コード長 232 bytes
コンパイル時間 332 ms
コンパイル使用メモリ 87,212 KB
実行使用メモリ 90,912 KB
平均クエリ数 78.17
最終ジャッジ日時 2023-09-04 18:22:40
合計ジャッジ時間 3,951 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
87,592 KB
testcase_01 AC 152 ms
90,912 KB
testcase_02 AC 113 ms
86,980 KB
testcase_03 AC 127 ms
87,424 KB
testcase_04 AC 111 ms
87,076 KB
testcase_05 AC 109 ms
87,328 KB
testcase_06 AC 110 ms
87,288 KB
testcase_07 AC 110 ms
87,012 KB
testcase_08 AC 121 ms
87,220 KB
testcase_09 AC 131 ms
87,240 KB
testcase_10 AC 108 ms
87,256 KB
testcase_11 AC 109 ms
87,300 KB
testcase_12 AC 109 ms
86,876 KB
testcase_13 AC 111 ms
87,276 KB
testcase_14 AC 110 ms
87,276 KB
testcase_15 AC 112 ms
87,488 KB
testcase_16 AC 109 ms
87,300 KB
testcase_17 AC 112 ms
87,212 KB
権限があれば一括ダウンロードができます

ソースコード

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