QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#545796#9136. Exponent CalculatorMu_SilkWA 0ms3648kbC++201.4kb2024-09-03 17:19:492024-09-03 17:19:50

Judging History

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

  • [2024-09-03 17:19:50]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3648kb
  • [2024-09-03 17:19:49]
  • 提交

answer

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

double ex(double x){
    double tt=256;
    double ans=0;
    double p=1;
    for(int i=0;i<=8;i++){    
        ans+=pow(x/tt,i)/p;
        p*=(i+1);
    }
    return pow(ans,tt);
}

void solve(){
    // for(int i=-20;i<=20;i++){
    //     cout<<(exp(i)-ex(i))/exp(i)<<"\n";
    // }
    cout<<fixed<<setprecision(12);
    cout<<"25\n";
    cout<<fixed<<"$1 = $1 * "<<1.0/256<<"\n";
    cout<<fixed<<"$0 = $1 * "<<1.0/8<<"\n";
    cout<<fixed<<"$0 = $0 + "<<1.0/7<<"\n";
    cout<<"$0 = $1 * $0\n";
    cout<<fixed<<"$0 = $0 + "<<1.0/6<<"\n";
    cout<<"$0 = $1 * $0\n";
    cout<<fixed<<"$0 = $0 + "<<1.0/5<<"\n";
    cout<<"$0 = $1 * $0\n";
    cout<<fixed<<"$0 = $0 + "<<1.0/4<<"\n";
    cout<<"$0 = $1 * $0\n";
    cout<<fixed<<"$0 = $0 + "<<1.0/3<<"\n";
    cout<<"$0 = $1 * $0\n";
    cout<<fixed<<"$0 = $0 + "<<1.0/2<<"\n";
    cout<<"$0 = $1 * $0\n";
    cout<<fixed<<"$0 = $0 + "<<1.0<<"\n";
    cout<<"$0 = $1 * $0\n";
    cout<<fixed<<"$0 = $0 + "<<1.0<<"\n";
    cout<<"$0 = $0 * $0\n";
    cout<<"$0 = $0 * $0\n";
    cout<<"$0 = $0 * $0\n";
    cout<<"$0 = $0 * $0\n";
    cout<<"$0 = $0 * $0\n";
    cout<<"$0 = $0 * $0\n";
    cout<<"$0 = $0 * $0\n";
    cout<<"$0 = $0 * $0\n";
}

int main(){
    ios::sync_with_stdio(0);
    cin.tie(0);cout.tie(0);
    int n=1;
    //cin>>n;
    while(n--)solve();
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

input

output:

25
$1 = $1 * 0.003906250000
$0 = $1 * 0.125000000000
$0 = $0 + 0.142857142857
$0 = $1 * $0
$0 = $0 + 0.166666666667
$0 = $1 * $0
$0 = $0 + 0.200000000000
$0 = $1 * $0
$0 = $0 + 0.250000000000
$0 = $1 * $0
$0 = $0 + 0.333333333333
$0 = $1 * $0
$0 = $0 + 0.500000000000
$0 = $1 * $0
$0 = $0 + 1.0000000...

result:

wrong answer x=-20,jury=2.06115e-09,participant=2.02035e-09,error=0.0197968