結果

問題 No.2252 Find Zero
ユーザー titiatitia
提出日時 2023-03-24 21:27:16
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 293 bytes
コンパイル時間 350 ms
コンパイル使用メモリ 11,916 KB
実行使用メモリ 26,620 KB
平均クエリ数 78.17
最終ジャッジ日時 2023-10-18 20:43:42
合計ジャッジ時間 2,994 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 AC 83 ms
26,452 KB
testcase_03 AC 96 ms
26,452 KB
testcase_04 AC 81 ms
26,452 KB
testcase_05 AC 80 ms
26,452 KB
testcase_06 AC 80 ms
26,452 KB
testcase_07 AC 81 ms
26,452 KB
testcase_08 AC 89 ms
26,460 KB
testcase_09 AC 94 ms
26,460 KB
testcase_10 AC 78 ms
26,452 KB
testcase_11 AC 81 ms
26,452 KB
testcase_12 RE -
testcase_13 AC 81 ms
26,452 KB
testcase_14 AC 79 ms
26,452 KB
testcase_15 RE -
testcase_16 AC 79 ms
26,452 KB
testcase_17 AC 79 ms
26,452 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

N=int(input())
for i in range(0,N,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