結果

問題 No.2357 Guess the Function
ユーザー erbowlerbowl
提出日時 2023-06-26 20:21:57
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 463 bytes
コンパイル時間 1,961 ms
コンパイル使用メモリ 197,560 KB
実行使用メモリ 24,240 KB
平均クエリ数 2.73
最終ジャッジ日時 2023-09-16 15:08:08
合計ジャッジ時間 3,682 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

typedef long long ll;
typedef long double ld;
#include <bits/stdc++.h>
using namespace std;
#define int long long

signed main(){
    std::cout << "? 100" << std::endl;
    ll x1;
    std::cin >> x1;
    std::cout << "? "<<100-x1-1<< std::endl;
    ll x2;
    std::cin >> x2;
    ll b = x2+1;
    for (int i = 1; i < b; i++) {
        if((i+100)%b==x1&&(i+100-x1-1)%b==x2){
            std::cout << i<<" "<<b << std::endl;
            return 0;
        }
    }
}
0