結果

問題 No.2252 Find Zero
ユーザー 👑 p-adicp-adic
提出日時 2023-05-22 01:47:45
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 349 bytes
コンパイル時間 87 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 27,744 KB
平均クエリ数 8.89
最終ジャッジ日時 2024-06-01 13:31:47
合計ジャッジ時間 3,047 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 84 ms
27,336 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 83 ms
27,232 KB
testcase_11 AC 85 ms
27,232 KB
testcase_12 AC 84 ms
27,232 KB
testcase_13 RE -
testcase_14 AC 84 ms
27,112 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

I,P=input,print
N=int(I())
x=y=0
if N==5:
	P("?",y,1)
	y=int(I())
	P("?",y,1)
	z=int(I())
	P("!",1-y if y<2 else 9-y-z),exit(0)
if N%2:
	P("?",y,y)
	y=int(I())
	if N==3:
		if x!=y:x=3-x-y
else:
	while N%2<1:
		P("?",y,y)
		y=int(I())
		N//=2
	x=y
N=N//2-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