結果
| 問題 |
No.2357 Guess the Function
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-06-29 17:21:34 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 24 ms / 1,000 ms |
| コード長 | 482 bytes |
| コンパイル時間 | 1,758 ms |
| コンパイル使用メモリ | 192,948 KB |
| 最終ジャッジ日時 | 2025-02-15 03:07:25 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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;
}