結果

問題 No.246 質問と回答
ユーザー Konton7Konton7
提出日時 2019-05-22 01:08:07
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 58 ms / 2,000 ms
コード長 347 bytes
コンパイル時間 385 ms
コンパイル使用メモリ 10,684 KB
実行使用メモリ 24,396 KB
平均クエリ数 99.00
最終ジャッジ日時 2023-09-23 20:31:40
合計ジャッジ時間 3,792 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 58 ms
23,520 KB
testcase_01 AC 57 ms
24,276 KB
testcase_02 AC 54 ms
23,608 KB
testcase_03 AC 55 ms
23,892 KB
testcase_04 AC 55 ms
24,264 KB
testcase_05 AC 55 ms
24,060 KB
testcase_06 AC 54 ms
23,632 KB
testcase_07 AC 54 ms
23,688 KB
testcase_08 AC 53 ms
24,048 KB
testcase_09 AC 54 ms
24,072 KB
testcase_10 AC 56 ms
24,252 KB
testcase_11 AC 54 ms
24,276 KB
testcase_12 AC 54 ms
24,252 KB
testcase_13 AC 52 ms
23,628 KB
testcase_14 AC 55 ms
23,628 KB
testcase_15 AC 54 ms
23,724 KB
testcase_16 AC 54 ms
24,060 KB
testcase_17 AC 56 ms
23,584 KB
testcase_18 AC 52 ms
23,896 KB
testcase_19 AC 52 ms
24,036 KB
testcase_20 AC 53 ms
23,456 KB
testcase_21 AC 55 ms
23,820 KB
testcase_22 AC 54 ms
24,288 KB
testcase_23 AC 54 ms
24,324 KB
testcase_24 AC 54 ms
24,396 KB
testcase_25 AC 53 ms
23,712 KB
testcase_26 AC 53 ms
24,336 KB
testcase_27 AC 53 ms
24,396 KB
testcase_28 AC 55 ms
24,288 KB
testcase_29 AC 53 ms
24,324 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

lt_list = []
gt_list = []

d = 5*(10**8)
d1 = 5*(10**8)

for i in range(99):
	ans = -1
	for i in lt_list:
		if i+1 in gt_list:
			ans = i
	
	if ans == -1:
		print("? "+str(d))
		res = int(input())
		d1 = max(d1//2 , 1)

		if res == 1:
			lt_list.append(d)
			d = d + d1
		else:
			gt_list.append(d)
			d = d - d1

	else:
		print("! "+str(ans))
		
0