結果

問題 No.2252 Find Zero
ユーザー titiatitia
提出日時 2023-03-24 21:28:19
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 103 ms / 2,000 ms
コード長 295 bytes
コンパイル時間 411 ms
コンパイル使用メモリ 11,816 KB
実行使用メモリ 26,468 KB
平均クエリ数 78.17
最終ジャッジ日時 2023-10-18 20:45:06
合計ジャッジ時間 3,100 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 90 ms
26,460 KB
testcase_01 AC 103 ms
26,460 KB
testcase_02 AC 78 ms
26,460 KB
testcase_03 AC 90 ms
26,460 KB
testcase_04 AC 79 ms
26,460 KB
testcase_05 AC 77 ms
26,460 KB
testcase_06 AC 77 ms
26,460 KB
testcase_07 AC 78 ms
26,460 KB
testcase_08 AC 88 ms
26,468 KB
testcase_09 AC 92 ms
26,468 KB
testcase_10 AC 78 ms
26,460 KB
testcase_11 AC 76 ms
26,460 KB
testcase_12 AC 77 ms
26,460 KB
testcase_13 AC 77 ms
26,460 KB
testcase_14 AC 77 ms
26,460 KB
testcase_15 AC 78 ms
26,460 KB
testcase_16 AC 78 ms
26,460 KB
testcase_17 AC 78 ms
26,460 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

N=int(input())
for i in range(0,N-1,2):
    j=i+1
    print("?",i,j,flush=True)
    x=int(input())

    if x==i:
        print("!",j,flush=True)
        break
    elif x==j:
        print("!",i,flush=True)
        break
else:
    print("!",N-1,flush=True)
0