結果
問題 |
No.2357 Guess the Function
|
ユーザー |
|
提出日時 | 2023-06-23 22:39:20 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 387 bytes |
コンパイル時間 | 1,485 ms |
コンパイル使用メモリ | 166,580 KB |
実行使用メモリ | 25,604 KB |
平均クエリ数 | 3.00 |
最終ジャッジ日時 | 2024-07-01 02:23:22 |
合計ジャッジ時間 | 2,595 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 1 |
other | WA * 10 |
ソースコード
#include<bits/stdc++.h> using namespace std; using ll=long long; int main(){ ll x1=2,x2=3; cout<<'?'<<" "<<x1<<endl; ll r1; cin>>r1; cout<<'?'<<" "<<x2<<endl; ll r2; cin>>r2; for(ll b=0;b<=100;b++){ for(ll a=0;a<b;a++){ if((x1+a-r1)%b==0&&(x2+a-r2)%b==0){ if(0<=a&&a<b){ cout<<a<<" "<<b<<endl; exit(0); } } } } }