結果

問題 No.2252 Find Zero
ユーザー dangodango
提出日時 2023-06-18 21:27:40
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 161 ms / 2,000 ms
コード長 194 bytes
コンパイル時間 291 ms
コンパイル使用メモリ 86,792 KB
実行使用メモリ 91,876 KB
平均クエリ数 119.28
最終ジャッジ日時 2023-09-08 15:54:35
合計ジャッジ時間 4,444 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
86,704 KB
testcase_01 AC 112 ms
87,424 KB
testcase_02 AC 161 ms
91,876 KB
testcase_03 AC 137 ms
90,864 KB
testcase_04 AC 132 ms
91,236 KB
testcase_05 AC 112 ms
87,476 KB
testcase_06 AC 142 ms
91,036 KB
testcase_07 AC 138 ms
91,148 KB
testcase_08 AC 141 ms
91,100 KB
testcase_09 AC 137 ms
91,052 KB
testcase_10 AC 111 ms
87,444 KB
testcase_11 AC 112 ms
86,860 KB
testcase_12 AC 114 ms
86,700 KB
testcase_13 AC 112 ms
86,776 KB
testcase_14 AC 113 ms
87,040 KB
testcase_15 AC 112 ms
87,124 KB
testcase_16 AC 112 ms
87,208 KB
testcase_17 AC 111 ms
87,280 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

S = set(range(int(input())))
while len(S)>1:
	X, Y = S.pop(),S.pop()
	print("?", X, Y)
	Z = int(input())
	if X == Z: print("!", Y); exit(0)
	if Y == Z: print("!", X); exit(0)
print("!", S.pop())
0