結果

問題 No.2357 Guess the Function
ユーザー とろちゃとろちゃ
提出日時 2023-06-23 22:25:21
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 1,057 bytes
コンパイル時間 294 ms
コンパイル使用メモリ 86,876 KB
実行使用メモリ 91,960 KB
平均クエリ数 2.82
最終ジャッジ日時 2023-09-13 17:26:52
合計ジャッジ時間 2,421 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 98 ms
87,016 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 98 ms
91,008 KB
testcase_07 AC 98 ms
91,320 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 99 ms
91,204 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# import pypyjit;pypyjit.set_param("max_unroll_recursion=-1")
# from bisect import *
# from collections import *
# from heapq import *
# from itertools import *
# from math import *
# from datetime import *
# from decimal import*
# from string import ascii_lowercase,ascii_uppercase
# import numpy as np
import sys
import os

# sys.setrecursionlimit(10**6)
INF = 10**18
MOD = 998244353
# MOD = 10**9 + 7
File = open("input.txt", "r") if os.path.exists("input.txt") else sys.stdin


def input():
    return File.readline()[:-1]


# ///////////////////////////////////////////////////////////////////////////
# testA = 15
# testB = 20

x1 = 2
print("? " + str(x1), flush=True)
m1 = int(input())
# if m1 == 0:
#     assert False
# m1 = (testA + x1) % testB
x2 = 99
print("? " + str(x2), flush=True)
m2 = int(input())
# m2 = (testA + x2) % testB
# print(m1, m2)

for i in range(1, 101):
    for j in range(i + 1, 101):
        res1 = (i + x1) % j == m1
        res2 = (i + x2) % j == m2
        if res1 and res2:
            print("!", i, j)
            exit()
0