結果
問題 | No.2252 Find Zero |
ユーザー |
![]() |
提出日時 | 2023-03-24 21:26:35 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 370 bytes |
コンパイル時間 | 313 ms |
コンパイル使用メモリ | 81,556 KB |
実行使用メモリ | 82,176 KB |
平均クエリ数 | 78.00 |
最終ジャッジ日時 | 2023-10-18 20:42:50 |
合計ジャッジ時間 | 3,626 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | WA | - |
testcase_02 | AC | 95 ms
69,800 KB |
testcase_03 | AC | 112 ms
69,800 KB |
testcase_04 | AC | 97 ms
69,808 KB |
testcase_05 | AC | 94 ms
69,808 KB |
testcase_06 | AC | 96 ms
69,808 KB |
testcase_07 | AC | 95 ms
69,808 KB |
testcase_08 | AC | 108 ms
69,800 KB |
testcase_09 | AC | 118 ms
75,340 KB |
testcase_10 | RE | - |
testcase_11 | RE | - |
testcase_12 | RE | - |
testcase_13 | AC | 94 ms
69,808 KB |
testcase_14 | AC | 93 ms
69,808 KB |
testcase_15 | WA | - |
testcase_16 | AC | 93 ms
69,808 KB |
testcase_17 | AC | 94 ms
69,808 KB |
ソースコード
import sys input = sys.stdin.readline n=int(input()) for i in range(n//2-1): print("?",i*2,i*2+1,flush=True) z=int(input()) if z==i*2: print("!",i*2+1,flush=True) exit() elif z==i*2+1: print("!",i*2,flush=True) exit() x=(n//2-2)*2+2 print("?",x,x-1,flush=True) z=int(input()) if z==x-1: print("!",x,flush=True) else: print("!",x+1,flush=True)