結果
| 問題 | No.2357 Guess the Function |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-06-29 17:21:34 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 16 ms / 1,000 ms |
| コード長 | 482 bytes |
| 記録 | |
| コンパイル時間 | 1,221 ms |
| コンパイル使用メモリ | 208,420 KB |
| 実行使用メモリ | 29,648 KB |
| 平均クエリ数 | 2.91 |
| 最終ジャッジ日時 | 2026-07-01 13:04:55 |
| 合計ジャッジ時間 | 2,551 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 10 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
using ll=long long;
using pii=pair<int,int>;
#define all(a) a.begin(),a.end()
#define pb push_back
#define sz(a) ((int)a.size())
signed main(){
ios_base::sync_with_stdio(0),cin.tie(0);
cout << "? 100" << endl;
int x; cin >> x;
if(x==99){
cout << "! 99 100" << endl;
return 0;
}
cout << "? " << 100-x-1 << endl;
int b; cin >> b; b++;
cout << "! " << (b-(100-x)%b)%b << ' ' << b << endl;
}