結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 57 ms
23,616 KB
testcase_01 AC 52 ms
24,004 KB
testcase_02 AC 53 ms
23,776 KB
testcase_03 AC 51 ms
23,928 KB
testcase_04 AC 51 ms
24,384 KB
testcase_05 AC 52 ms
24,436 KB
testcase_06 AC 52 ms
24,272 KB
testcase_07 AC 54 ms
24,108 KB
testcase_08 AC 55 ms
24,056 KB
testcase_09 AC 54 ms
24,212 KB
testcase_10 AC 52 ms
23,948 KB
testcase_11 AC 53 ms
24,116 KB
testcase_12 AC 52 ms
23,860 KB
testcase_13 AC 51 ms
24,200 KB
testcase_14 AC 52 ms
24,048 KB
testcase_15 WA -
testcase_16 AC 52 ms
23,912 KB
testcase_17 AC 51 ms
24,196 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,y)
	w=int(I())
	P("!",1-y if y<2 else y if z<1 else z if w<1 else 20-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