結果

問題 No.2252 Find Zero
ユーザー 👑 p-adicp-adic
提出日時 2023-05-22 02:44:08
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 492 bytes
コンパイル時間 184 ms
コンパイル使用メモリ 10,984 KB
実行使用メモリ 24,456 KB
平均クエリ数 9.56
最終ジャッジ日時 2023-08-23 16:34:56
合計ジャッジ時間 2,729 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 57 ms
23,828 KB
testcase_01 AC 55 ms
23,844 KB
testcase_02 AC 54 ms
24,088 KB
testcase_03 AC 54 ms
23,908 KB
testcase_04 AC 53 ms
23,860 KB
testcase_05 AC 54 ms
24,400 KB
testcase_06 AC 54 ms
24,276 KB
testcase_07 AC 55 ms
24,148 KB
testcase_08 AC 54 ms
24,356 KB
testcase_09 AC 55 ms
23,540 KB
testcase_10 AC 55 ms
24,456 KB
testcase_11 AC 54 ms
24,100 KB
testcase_12 AC 54 ms
23,884 KB
testcase_13 AC 53 ms
23,880 KB
testcase_14 AC 53 ms
23,888 KB
testcase_15 RE -
testcase_16 AC 52 ms
24,104 KB
testcase_17 AC 53 ms
24,436 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

I,P,E=input,print,exit
N=int(I())
y=0
if N==3:
	P("?",0,0)
	y=int(I())
	P("!",y*2%3),E(0)
if N==5:
	P("?",1,0)
	y=int(I())
	P("?",y,0)
	z=int(I())
	P("!",1-y if y<2 else y if z<1 else 9-y-z),E(0)
if N==7:
	P("?",1,0)
	y=int(I())
	P("?",y,0)
	z=int(I())
	P("?",z,0)
	w=int(I())
	P("!",1-y if y<2 else y if z<1 else z if w<1 else 20-x-y-z-w),E(0)
while N%2<1:
	P("?",y,y)
	y=int(I())
	N//=2
x,N=y,N-1
while N:
	if N%2:
		P("?",x,y)
		x=int(I())
	N=N//2
	if N:
		P("?",y,y)
		y=int(I())
P("!",x)
0