結果

問題 No.2357 Guess the Function
ユーザー とりゐとりゐ
提出日時 2023-06-27 00:25:19
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 242 bytes
コンパイル時間 307 ms
コンパイル使用メモリ 87,044 KB
実行使用メモリ 95,364 KB
平均クエリ数 2.64
最終ジャッジ日時 2023-09-16 19:52:49
合計ジャッジ時間 2,889 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 99 ms
87,416 KB
testcase_01 RE -
testcase_02 AC 103 ms
87,120 KB
testcase_03 RE -
testcase_04 AC 99 ms
87,536 KB
testcase_05 RE -
testcase_06 AC 99 ms
87,228 KB
testcase_07 AC 100 ms
87,300 KB
testcase_08 RE -
testcase_09 AC 99 ms
87,364 KB
testcase_10 AC 98 ms
87,228 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

x1=100
print('?',x1,flush=True)
y1=int(input())

x2=99-y1
print('?',x2,flush=True)
y2=int(input())

'''
y1=(100+A)%B
y2=(x2+A)%B=(99-y1+A)%B=(-1)%B
'''

B=y2+1
A=-1
for i in range(1,B):
  if (100+i)%B==y1:
    A=i

assert A!=-1
print('!',A,B)
0