結果

問題 No.2357 Guess the Function
ユーザー 👑 SPD_9X2SPD_9X2
提出日時 2023-06-23 21:37:57
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 363 bytes
コンパイル時間 1,446 ms
コンパイル使用メモリ 86,728 KB
実行使用メモリ 94,544 KB
平均クエリ数 2.64
最終ジャッジ日時 2023-09-13 16:36:57
合計ジャッジ時間 2,928 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 98 ms
86,916 KB
testcase_01 WA -
testcase_02 AC 95 ms
87,148 KB
testcase_03 RE -
testcase_04 AC 92 ms
86,928 KB
testcase_05 WA -
testcase_06 AC 93 ms
87,048 KB
testcase_07 AC 94 ms
86,824 KB
testcase_08 WA -
testcase_09 AC 94 ms
87,196 KB
testcase_10 AC 93 ms
86,940 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

"""

100+A % B = C

1回目も有効活用しないとだめ

(100+A) % B = C
(100+A-C-1) % B = B-1

で、Bがわかる
AはB未満なので、一意

"""

import sys
print ("?",100,flush=True)

c = int(input())

print ("?",100-c-1,flush=True)
d = int(input())

b = d + 1

for a in range(1,b):
    if (100+a) % b == c:
        print ("!",a,b)
        sys.exit()
0