結果

問題 No.2252 Find Zero
ユーザー aaaaaaaaaa2230aaaaaaaaaa2230
提出日時 2023-03-24 21:31:55
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 230 bytes
コンパイル時間 1,278 ms
コンパイル使用メモリ 81,624 KB
実行使用メモリ 80,464 KB
平均クエリ数 78.17
最終ジャッジ日時 2023-10-18 20:48:45
合計ジャッジ時間 3,200 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

import sys

n = int(input())

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