結果

問題 No.3115 One Power One Kill
ユーザー Mistletoe
提出日時 2025-04-19 11:56:09
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 1,201 bytes
コンパイル時間 786 ms
コンパイル使用メモリ 77,696 KB
実行使用メモリ 26,480 KB
平均クエリ数 3.00
最終ジャッジ日時 2025-04-19 11:56:15
合計ジャッジ時間 4,815 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other WA * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <cmath>
#include <numeric>
using namespace std;

const long long MOD = 1000000007;

long long mod_exp(long long base, long long exp, long long mod) {
    long long result = 1;
    base = base % mod;
    while (exp > 0) {
        if (exp % 2 == 1) {
            result = (result * base) % mod;
        }
        exp = exp >> 1;
        base = (base * base) % mod;
    }
    return result;
}

int main() {
    // First, pick some reasonable values for A and B
    int A = 123, B = 456;
    
    // Output A and B
    cout << A << " " << B << endl;
    cout.flush();

    // Get the gcd(X, Y) from the judge
    int K;
    cin >> K;

    // Now, you can make a guess about X'
    // In a real solution, this would depend on the received K value and your logic
    // For simplicity, we'll assume we guess the value of X' based on the info we have
    
    int X_prime = 64;  // Example guess
    
    cout << X_prime << endl;
    cout.flush();

    // Check the result
    int ret;
    cin >> ret;
    
    if (ret == 1) {
        cout << "Success! The guess is correct." << endl;
    } else {
        cout << "Fail. The guess was incorrect." << endl;
    }

    return 0;
}
0