結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 93 ms
26,460 KB
testcase_01 AC 109 ms
26,460 KB
testcase_02 AC 84 ms
26,460 KB
testcase_03 AC 98 ms
26,460 KB
testcase_04 AC 84 ms
26,460 KB
testcase_05 AC 82 ms
26,460 KB
testcase_06 AC 85 ms
26,460 KB
testcase_07 AC 85 ms
26,460 KB
testcase_08 AC 95 ms
26,468 KB
testcase_09 AC 99 ms
26,468 KB
testcase_10 AC 85 ms
26,460 KB
testcase_11 AC 84 ms
26,460 KB
testcase_12 AC 86 ms
26,460 KB
testcase_13 AC 86 ms
26,460 KB
testcase_14 AC 86 ms
26,460 KB
testcase_15 AC 84 ms
26,460 KB
testcase_16 AC 87 ms
26,460 KB
testcase_17 AC 87 ms
26,460 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
for i in range(N // 2):
    print("?", 2 * i, 2 * i + 1)
    a = int(input())
    if a == 2 * i:
        print("!", 2 * i + 1)
        break
    elif a == 2 * i + 1:
        print("!", 2 * i)
        break
else:
    print("!", N - 1)
0