結果

問題 No.2357 Guess the Function
ユーザー ShirotsumeShirotsume
提出日時 2023-06-23 22:49:34
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 71 ms / 1,000 ms
コード長 594 bytes
コンパイル時間 222 ms
コンパイル使用メモリ 82,500 KB
実行使用メモリ 73,848 KB
平均クエリ数 2.91
最終ジャッジ日時 2024-07-01 02:35:26
合計ジャッジ時間 1,930 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys, time, random
from collections import deque, Counter, defaultdict
input = lambda: sys.stdin.readline().rstrip()
ii = lambda: int(input())
mi = lambda: map(int, input().split())
li = lambda: list(mi())
inf = 2 ** 63 - 1
mod = 998244353

print('?', 100, flush=True)
x = ii()
if 100 - x - 1 == 0:
    b = 100
    a = 99
    print('!', a, b, flush=True)
    exit()
else:
    print('?', 100 - x - 1, flush=True)
    y = ii()
    b = y + 1

    for a in range(0, b):
        if (100 + a) % b == x and (100 - x - 1 + a) % b == y:
            print('!', a, b, flush=True)
            exit()
0