QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#562559#9136. Exponent Calculatorucup-team3691WA 0ms3940kbC++23966b2024-09-13 18:40:262024-09-13 18:40:26

Judging History

你现在查看的是最新测评结果

  • [2024-09-13 18:40:26]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3940kb
  • [2024-09-13 18:40:26]
  • 提交

answer

#include <iostream>
#include <vector>
#include <queue>
#include <algorithm>
#include <iomanip>
#include <ctime>
#include <random>
#include <cassert>

using namespace std;
using ll = long long;
using ld = long double;

void solve() {
    ld x, ans = 0;
    cin >> x;
    ld coeff = 1;
    int cnt = 23;
    cout << "25\n";
    for (int i = 0; i < cnt; i++) {
        coeff /= 2;
    }
    x *= coeff;
    cout << fixed << setprecision(20) << "$1 = $1 * " << coeff << '\n';
    ans = x + 1;
    cout << "$0 = $1 + 1\n";
    for (int i = 0; i < cnt; i++) {
        ans *= ans;
        cout << "$0 = $0 * $0\n";
    }
    cerr << ans;
}

signed main() {
#ifdef LOCAL
    freopen("test.in", "r", stdin);
    freopen("test.out", "w", stdout);
#endif // LOCAL
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    int nrt = 1;
    //cin >> nrt;
    while (nrt--) {
        solve();
    }
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3940kb

input:

input

output:

25
$1 = $1 * 0.00000011920928955078
$0 = $1 + 1
$0 = $0 * $0
$0 = $0 * $0
$0 = $0 * $0
$0 = $0 * $0
$0 = $0 * $0
$0 = $0 * $0
$0 = $0 * $0
$0 = $0 * $0
$0 = $0 * $0
$0 = $0 * $0
$0 = $0 * $0
$0 = $0 * $0
$0 = $0 * $0
$0 = $0 * $0
$0 = $0 * $0
$0 = $0 * $0
$0 = $0 * $0
$0 = $0 * $0
$0 = $0 * $0
$0 = ...

result:

wrong answer x=-20,jury=2.06115e-09,participant=2.0611e-09,error=2.38415e-05