結果

問題 No.2252 Find Zero
ユーザー sotanishysotanishy
提出日時 2023-03-24 21:24:49
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 130 ms / 2,000 ms
コード長 262 bytes
コンパイル時間 144 ms
コンパイル使用メモリ 81,788 KB
実行使用メモリ 78,384 KB
平均クエリ数 78.17
最終ジャッジ日時 2023-10-18 20:40:29
合計ジャッジ時間 3,130 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 100 ms
69,872 KB
testcase_01 AC 130 ms
78,384 KB
testcase_02 AC 89 ms
69,872 KB
testcase_03 AC 113 ms
69,872 KB
testcase_04 AC 93 ms
69,880 KB
testcase_05 AC 89 ms
69,880 KB
testcase_06 AC 89 ms
69,880 KB
testcase_07 AC 90 ms
69,880 KB
testcase_08 AC 102 ms
69,872 KB
testcase_09 AC 111 ms
75,408 KB
testcase_10 AC 89 ms
69,880 KB
testcase_11 AC 89 ms
69,880 KB
testcase_12 AC 92 ms
69,880 KB
testcase_13 AC 92 ms
69,880 KB
testcase_14 AC 90 ms
69,880 KB
testcase_15 AC 91 ms
69,880 KB
testcase_16 AC 89 ms
69,880 KB
testcase_17 AC 90 ms
69,880 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

N = int(input())
for i in range(N//2):
    x = 2*i
    y = x+1
    print('?', x, y, flush=True)
    z = int(input())
    if z == x or z == y:
        print('!', z ^ 1, flush=True)
        exit()
print('!', N-1, flush=True)
0