結果

問題 No.2252 Find Zero
ユーザー ああいいああいい
提出日時 2023-03-25 17:01:04
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 508 bytes
コンパイル時間 184 ms
コンパイル使用メモリ 81,640 KB
実行使用メモリ 80,456 KB
平均クエリ数 117.72
最終ジャッジ日時 2023-10-19 03:08:12
合計ジャッジ時間 3,481 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 106 ms
69,844 KB
testcase_01 AC 122 ms
75,424 KB
testcase_02 AC 101 ms
69,844 KB
testcase_03 WA -
testcase_04 AC 124 ms
75,432 KB
testcase_05 WA -
testcase_06 AC 129 ms
77,480 KB
testcase_07 AC 124 ms
75,432 KB
testcase_08 AC 113 ms
69,844 KB
testcase_09 AC 148 ms
80,456 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 96 ms
69,852 KB
testcase_13 AC 95 ms
69,852 KB
testcase_14 AC 95 ms
69,852 KB
testcase_15 AC 96 ms
69,852 KB
testcase_16 AC 96 ms
69,852 KB
testcase_17 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
import sys

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

    for i in range(0,N // 2 - 1,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:
    print("? 0 0")
    a = int(input())
    now = a
    for _ in range(N // 2 - 1):
        print("?",a,now)
        now = int(input())
    print("!",now)
    
0