結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 102 ms
69,864 KB
testcase_01 AC 133 ms
80,460 KB
testcase_02 AC 86 ms
69,864 KB
testcase_03 AC 111 ms
75,440 KB
testcase_04 AC 91 ms
69,872 KB
testcase_05 AC 87 ms
69,872 KB
testcase_06 AC 89 ms
69,872 KB
testcase_07 AC 87 ms
69,872 KB
testcase_08 AC 101 ms
69,864 KB
testcase_09 AC 111 ms
75,440 KB
testcase_10 AC 86 ms
69,872 KB
testcase_11 AC 87 ms
69,872 KB
testcase_12 AC 87 ms
69,872 KB
testcase_13 AC 86 ms
69,872 KB
testcase_14 AC 88 ms
69,872 KB
testcase_15 AC 88 ms
69,872 KB
testcase_16 AC 88 ms
69,872 KB
testcase_17 AC 87 ms
69,872 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n= int(input())

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