結果
| 問題 |
No.2357 Guess the Function
|
| コンテスト | |
| ユーザー |
srjywrdnprkt
|
| 提出日時 | 2023-06-29 19:31:28 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 26 ms / 1,000 ms |
| コード長 | 397 bytes |
| コンパイル時間 | 2,126 ms |
| コンパイル使用メモリ | 192,008 KB |
| 最終ジャッジ日時 | 2025-02-15 03:09:16 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 10 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
void qry(int x){
cout << "? " << x << endl;
}
void ans(int a, int b){
cout << "! " << a << " " << b << endl;
exit(0);
}
int main(){
int x, y, a, b;
qry(100);
cin >> x;
if (x == 99) ans(99, 100);
qry(99-x);
cin >> y;
b = y+1;
a = ((x-100)%b+b) % b;
ans(a, b);
return 0;
}
srjywrdnprkt