結果

問題 No.2753 鳩の巣原理
コンテスト
ユーザー hato336
提出日時 2024-05-10 21:43:15
言語 PyPy3
(8.0.0 + ACL)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 144 ms / 2,000 ms
+ 2µs
コード長 493 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 61 ms
コンパイル使用メモリ 82,664 KB
実行使用メモリ 56,768 KB
平均クエリ数 11.00
最終ジャッジ日時 2026-10-05 01:40:49
合計ジャッジ時間 2,901 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 30
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

n = int(input())
cnt = []
class nibutan():
    def __init__(self):
        self.n = n
    def __len__(self):
        return self.n
    def __getitem__(self,x):
        cnt.append(0)
        print('?',x+1,flush=True)
        z = int(input())
        if z < x+1:
            return 1
        else:
            return 0
import bisect
ans = bisect.bisect_right(nibutan(),0)
while len(cnt) != 10:
    cnt.append(0)
    print('?',1,flush=True)
    z = int(input())
print('Yes',ans,ans+1,flush=True)
0