結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 57 ms
23,520 KB
testcase_01 AC 57 ms
23,436 KB
testcase_02 AC 57 ms
23,964 KB
testcase_03 AC 58 ms
23,456 KB
testcase_04 AC 58 ms
24,240 KB
testcase_05 AC 55 ms
23,380 KB
testcase_06 AC 56 ms
24,372 KB
testcase_07 AC 55 ms
23,796 KB
testcase_08 AC 55 ms
23,560 KB
testcase_09 AC 58 ms
23,632 KB
testcase_10 AC 56 ms
24,012 KB
testcase_11 AC 55 ms
24,408 KB
testcase_12 AC 56 ms
24,200 KB
testcase_13 AC 55 ms
23,392 KB
testcase_14 AC 54 ms
24,188 KB
testcase_15 RE -
testcase_16 AC 55 ms
23,752 KB
testcase_17 AC 55 ms
24,036 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

I,P=input,print
N=int(I())
y=0
if N==3:
	P("?",y,y)
	y=int(I())
	P("!",y*2%3),exit(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)
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