結果
| 問題 |
No.2357 Guess the Function
|
| コンテスト | |
| ユーザー |
とりゐ
|
| 提出日時 | 2023-06-27 00:34:15 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 61 ms / 1,000 ms |
| コード長 | 280 bytes |
| コンパイル時間 | 155 ms |
| コンパイル使用メモリ | 82,788 KB |
| 実行使用メモリ | 68,744 KB |
| 平均クエリ数 | 2.91 |
| 最終ジャッジ日時 | 2024-07-03 19:23:37 |
| 合計ジャッジ時間 | 1,665 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 10 |
ソースコード
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)
とりゐ