QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#558750#9136. Exponent Calculatorucup-team3691#WA 0ms3804kbC++23983b2024-09-11 18:19:552024-09-11 18:19:56

Judging History

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

  • [2024-09-11 18:19:56]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3804kb
  • [2024-09-11 18:19:55]
  • 提交

answer

#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <algorithm>
#include <queue>
#include <iomanip>

using namespace std;
using ll = long long;

void solve() {
    string str;
    cin >> str;
    cout << "25\n";
    cout << fixed << setprecision(16);
    for (int i = 2; i <= 9; i++) {
        cout << "$" << i << " = $" << i - 1 << " * $1\n";
    }
    cout << "$0 = $9 * " << (long double) 1/9 << '\n';
    for (int i = 8; i >= 2; i--) {
        cout << "$0 = $0 + $" << i << '\n';
        cout << "$0 = $0 * " << (long double) 1/i << '\n';
    }
    cout << "$0 = $0 + $1\n";
    cout << "$0 = $0 + 1\n";

}

int main() {
#ifdef LOCAL
    freopen("test.in", "r", stdin);
    freopen("test.out", "w", stdout);
#endif // LOCAL
    ios_base::sync_with_stdio(false);
    cin.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: 3804kb

input:

input

output:

25
$2 = $1 * $1
$3 = $2 * $1
$4 = $3 * $1
$5 = $4 * $1
$6 = $5 * $1
$7 = $6 * $1
$8 = $7 * $1
$9 = $8 * $1
$0 = $9 * 0.1111111111111111
$0 = $0 + $8
$0 = $0 * 0.1250000000000000
$0 = $0 + $7
$0 = $0 * 0.1428571428571429
$0 = $0 + $6
$0 = $0 * 0.1666666666666667
$0 = $0 + $5
$0 = $0 * 0.2000000000000...

result:

wrong answer x=-20,jury=2.06115e-09,participant=-962246,error=4.66848e+14