結果
問題 |
No.2357 Guess the Function
|
ユーザー |
![]() |
提出日時 | 2023-06-28 14:05:14 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 968 bytes |
コンパイル時間 | 4,142 ms |
コンパイル使用メモリ | 251,604 KB |
最終ジャッジ日時 | 2025-02-15 02:51:30 |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 1 |
other | AC * 4 WA * 6 |
ソースコード
#include <bits/stdc++.h> #include<atcoder/all> using namespace atcoder; using namespace std; using ll=long long; using ld=long double; ld pie=3.141592653589793; ll inf=20000000000000; ll mod=998244353; int main(){ cout << "? 2" << endl; ll a,b; ll x; cin >> x; if (x>=2) { a=x-2; cout << "? 100" << endl; ll y=a+100; ll z; cin >> z; ll ans=y-z; if (ans>100) { for (ll i = 2; i < 100; i++) { if (a%i!=0&&ans%i==0) { ans/=i; break; } } } cout << "! " << a << ' ' << ans << endl; }else{ cout << "? 0" << endl; ll a; cin >> a; for (ll i = a+1; i <100; i++) { if ((a+2)%i==x) { cout << "! " << a << ' ' << i << endl; } } } }