結果

問題 No.2252 Find Zero
ユーザー hir355hir355
提出日時 2023-03-24 21:26:15
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 227 bytes
コンパイル時間 192 ms
コンパイル使用メモリ 81,624 KB
実行使用メモリ 87,296 KB
平均クエリ数 78.17
最終ジャッジ日時 2023-10-18 20:41:58
合計ジャッジ時間 3,280 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 AC 89 ms
69,852 KB
testcase_03 AC 112 ms
75,424 KB
testcase_04 AC 92 ms
69,860 KB
testcase_05 AC 89 ms
69,860 KB
testcase_06 AC 89 ms
69,860 KB
testcase_07 AC 88 ms
69,860 KB
testcase_08 AC 103 ms
69,852 KB
testcase_09 AC 113 ms
75,424 KB
testcase_10 AC 88 ms
69,860 KB
testcase_11 AC 88 ms
69,860 KB
testcase_12 RE -
testcase_13 AC 87 ms
69,860 KB
testcase_14 AC 86 ms
69,860 KB
testcase_15 RE -
testcase_16 AC 87 ms
69,860 KB
testcase_17 AC 87 ms
69,860 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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