結果

問題 No.2357 Guess the Function
ユーザー aaaaaaaaaa2230
提出日時 2023-06-24 17:30:21
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 72 ms / 1,000 ms
コード長 300 bytes
コンパイル時間 190 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 68,696 KB
平均クエリ数 2.91
最終ジャッジ日時 2024-07-01 20:29:18
合計ジャッジ時間 2,021 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

def out(x):
    print("?",x)
    sys.stdout.flush()

    return int(input())


x1 = 100
y1 = out(x1)

if y1 == 99:
    print("!",y1,x1)
else:

    x2 = 100-y1-1
    y2 = out(x2)

    b = y2+1

    for i in range(b):
        if (x2+i)%b == y2:
            print("!",i,b)
            exit()
0