結果

問題 No.2252 Find Zero
ユーザー ああいいああいい
提出日時 2023-03-25 17:15:07
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 142 ms / 2,000 ms
コード長 267 bytes
コンパイル時間 178 ms
コンパイル使用メモリ 81,604 KB
実行使用メモリ 80,440 KB
平均クエリ数 78.17
最終ジャッジ日時 2023-10-19 03:19:06
合計ジャッジ時間 3,402 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 110 ms
69,848 KB
testcase_01 AC 142 ms
80,440 KB
testcase_02 AC 105 ms
69,848 KB
testcase_03 AC 119 ms
75,412 KB
testcase_04 AC 96 ms
69,856 KB
testcase_05 AC 95 ms
69,856 KB
testcase_06 AC 95 ms
69,856 KB
testcase_07 AC 93 ms
69,856 KB
testcase_08 AC 107 ms
69,848 KB
testcase_09 AC 116 ms
75,464 KB
testcase_10 AC 95 ms
69,856 KB
testcase_11 AC 94 ms
69,856 KB
testcase_12 AC 93 ms
69,856 KB
testcase_13 AC 94 ms
69,856 KB
testcase_14 AC 92 ms
69,856 KB
testcase_15 AC 94 ms
69,856 KB
testcase_16 AC 92 ms
69,856 KB
testcase_17 AC 92 ms
69,856 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
import sys

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