結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 112 ms
69,744 KB
testcase_01 AC 143 ms
80,280 KB
testcase_02 AC 96 ms
69,744 KB
testcase_03 AC 119 ms
75,296 KB
testcase_04 RE -
testcase_05 AC 97 ms
69,752 KB
testcase_06 RE -
testcase_07 RE -
testcase_08 AC 107 ms
69,744 KB
testcase_09 RE -
testcase_10 AC 95 ms
69,752 KB
testcase_11 AC 93 ms
69,752 KB
testcase_12 AC 93 ms
69,752 KB
testcase_13 AC 95 ms
69,752 KB
testcase_14 AC 95 ms
69,752 KB
testcase_15 AC 94 ms
69,752 KB
testcase_16 RE -
testcase_17 AC 94 ms
69,932 KB
権限があれば一括ダウンロードができます

ソースコード

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