結果

問題 No.2252 Find Zero
ユーザー ikomaikoma
提出日時 2023-03-24 22:21:02
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 140 ms / 2,000 ms
コード長 253 bytes
コンパイル時間 147 ms
コンパイル使用メモリ 81,808 KB
実行使用メモリ 80,512 KB
平均クエリ数 78.17
最終ジャッジ日時 2023-10-18 21:13:52
合計ジャッジ時間 3,265 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 106 ms
69,936 KB
testcase_01 AC 140 ms
80,512 KB
testcase_02 AC 92 ms
69,936 KB
testcase_03 AC 116 ms
75,484 KB
testcase_04 AC 94 ms
69,944 KB
testcase_05 AC 91 ms
69,944 KB
testcase_06 AC 90 ms
69,944 KB
testcase_07 AC 93 ms
69,944 KB
testcase_08 AC 105 ms
69,936 KB
testcase_09 AC 116 ms
75,484 KB
testcase_10 AC 91 ms
69,944 KB
testcase_11 AC 90 ms
69,944 KB
testcase_12 AC 90 ms
69,944 KB
testcase_13 AC 89 ms
69,944 KB
testcase_14 AC 90 ms
69,944 KB
testcase_15 AC 91 ms
69,944 KB
testcase_16 AC 92 ms
69,944 KB
testcase_17 AC 92 ms
69,944 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())

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