結果

問題 No.2252 Find Zero
ユーザー ああいいああいい
提出日時 2023-03-25 17:10:01
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 519 bytes
コンパイル時間 188 ms
コンパイル使用メモリ 81,636 KB
実行使用メモリ 84,580 KB
平均クエリ数 61.06
最終ジャッジ日時 2023-10-19 03:14:37
合計ジャッジ時間 3,661 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 105 ms
69,932 KB
testcase_01 AC 121 ms
75,492 KB
testcase_02 AC 94 ms
69,932 KB
testcase_03 AC 118 ms
75,492 KB
testcase_04 RE -
testcase_05 WA -
testcase_06 RE -
testcase_07 RE -
testcase_08 AC 110 ms
69,936 KB
testcase_09 RE -
testcase_10 AC 95 ms
69,944 KB
testcase_11 AC 96 ms
69,944 KB
testcase_12 AC 95 ms
69,944 KB
testcase_13 AC 102 ms
69,944 KB
testcase_14 AC 95 ms
69,944 KB
testcase_15 AC 93 ms
69,944 KB
testcase_16 RE -
testcase_17 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
import sys

if N % 2 == 1:
    s = set()
    count = 0

    for i in range(0,N // 2,2):
        print("?",i,i + 1)
        a = int(input())
        if a == i:
            print("!",i + 1)
            exit()
        if a == i + 1:
            print("!",i)
            exit()
            
    print("!",N - 1)
            
else:
    for i in range(0,N,2):
        print("?",i,i + 1)
        a = int(input())
        if a == i:
            print("!",i + 1)
        if a == i + 1:
            print("!",i)
0