結果

問題 No.2357 Guess the Function
ユーザー 👑 terry_u16terry_u16
提出日時 2023-06-24 10:33:37
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 301 bytes
コンパイル時間 519 ms
コンパイル使用メモリ 68,312 KB
実行使用メモリ 24,360 KB
平均クエリ数 3.00
最終ジャッジ日時 2023-09-14 06:05:31
合計ジャッジ時間 1,826 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <iostream>
#include <string>

using namespace std;

int main() {
    int q1, q2;
    cout << "? " << 1 << endl;
    cin >> q1;
    int diff = q1 + 1;

    cout << "? " << diff + 1 << endl;
    cin >> q2;

    int b = q2 + 1;
    int a = b - diff;

    cout << "! " << a << " " << b << endl;
}
0