結果

問題 No.2252 Find Zero
ユーザー MottchanMottchan
提出日時 2023-03-25 11:32:32
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 138 ms / 2,000 ms
コード長 329 bytes
コンパイル時間 179 ms
コンパイル使用メモリ 81,788 KB
実行使用メモリ 80,544 KB
平均クエリ数 78.17
最終ジャッジ日時 2023-10-18 22:51:28
合計ジャッジ時間 3,776 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

n = int(input())
m = n//2
a=0
b=1
print('?',a,b)
for i in range(0,m):
    z = int(input())
    if a == z:
        print('!',b)
        break
    elif b == z:
        print('!',a)
        break
    else:
        a += 2
        b += 2
        if a == n or b == n:
            print('!',n-1)
        else:
            print('?',a,b)
0