結果

問題 No.2357 Guess the Function
ユーザー とりゐとりゐ
提出日時 2023-06-27 00:34:15
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 95 ms / 1,000 ms
コード長 280 bytes
コンパイル時間 471 ms
コンパイル使用メモリ 86,912 KB
実行使用メモリ 87,568 KB
平均クエリ数 2.91
最終ジャッジ日時 2023-09-16 20:02:48
合計ジャッジ時間 3,088 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 95 ms
87,228 KB
testcase_01 AC 89 ms
87,196 KB
testcase_02 AC 90 ms
87,096 KB
testcase_03 AC 93 ms
87,564 KB
testcase_04 AC 90 ms
87,488 KB
testcase_05 AC 90 ms
86,976 KB
testcase_06 AC 90 ms
87,032 KB
testcase_07 AC 90 ms
87,508 KB
testcase_08 AC 91 ms
87,108 KB
testcase_09 AC 92 ms
87,212 KB
testcase_10 AC 91 ms
87,568 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

x1=100
print('?',x1,flush=True)
y1=int(input())
if y1==99:
  print('!',99,100)
  exit()

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(B):
  if (100+i)%B==y1:
    A=i

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