結果

問題 No.2252 Find Zero
ユーザー gr1msl3ygr1msl3y
提出日時 2023-03-25 00:37:28
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 150 ms / 2,000 ms
コード長 275 bytes
コンパイル時間 883 ms
コンパイル使用メモリ 81,292 KB
実行使用メモリ 80,360 KB
平均クエリ数 78.17
最終ジャッジ日時 2023-10-18 21:50:49
合計ジャッジ時間 4,240 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 110 ms
69,848 KB
testcase_01 AC 150 ms
80,360 KB
testcase_02 AC 98 ms
69,848 KB
testcase_03 AC 122 ms
75,372 KB
testcase_04 AC 100 ms
69,856 KB
testcase_05 AC 97 ms
69,856 KB
testcase_06 AC 97 ms
69,856 KB
testcase_07 AC 98 ms
69,856 KB
testcase_08 AC 111 ms
69,848 KB
testcase_09 AC 124 ms
75,372 KB
testcase_10 AC 96 ms
69,856 KB
testcase_11 AC 96 ms
69,856 KB
testcase_12 AC 97 ms
69,856 KB
testcase_13 AC 98 ms
69,856 KB
testcase_14 AC 95 ms
69,856 KB
testcase_15 AC 97 ms
69,856 KB
testcase_16 AC 96 ms
69,856 KB
testcase_17 AC 96 ms
69,856 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
for i in range(N//2):
    print('?', 2*i, 2*i+1, flush=True)
    v = int(input())
    if v == 2*i:
        print('!', 2*i+1, flush=True)
        break
    if v == 2*i+1:
        print('!', 2*i, flush=True)
        break
else:
    print('!', N-1, flush=True)
0