結果
| 問題 | 
                            No.2753 鳩の巣原理
                             | 
                    
| コンテスト | |
| ユーザー | 
                             shobonvip
                         | 
                    
| 提出日時 | 2024-05-10 22:03:39 | 
| 言語 | PyPy3  (7.3.15)  | 
                    
| 結果 | 
                             
                                RE
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 293 bytes | 
| コンパイル時間 | 232 ms | 
| コンパイル使用メモリ | 82,524 KB | 
| 実行使用メモリ | 165,124 KB | 
| 平均クエリ数 | 7.73 | 
| 最終ジャッジ日時 | 2024-12-20 05:40:39 | 
| 合計ジャッジ時間 | 7,097 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 7 RE * 23 | 
ソースコード
# a[i] = i
n = int(input())
ub = n # NG
lb = 0 # OK
tim = 0
while ub - lb > 1:
	t = (ub + lb) // 2
	print(f"? {t}")
	tim += 1
	x = int(input())
	if x == t:
		lb = t
	else:
		ub = t
while tim<10:
	print(f"? {1}")
	x = int(input())
	tmp += 1
if lb == 0:
	print("No")
else:
	print("Yes",lb,lb+1)
            
            
            
        
            
shobonvip