QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#784077#6423. Fireworkssurenjamts#WA 1ms3832kbC++20845b2024-11-26 13:09:032024-11-26 13:09:07

Judging History

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

  • [2024-11-26 13:09:07]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3832kb
  • [2024-11-26 13:09:03]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define mk make_pair
#define S second
#define F first
void solve(){
    double p, n, m;
    cin >> n >> m >> p;
    double P = 1;
    double ev = 1e18;
    int ans = 0;
    for(double x = 1; x <= 10000; x+=1.0){
        P *= (1.0 - p / 10000.0);
        double N = n * x + m;
        double evx = 1.0 /(1.0 - P);
       // cout << P << " " << evx << " " << evx * N << '\n';
        if(evx * N < ev) ans = x;
        ev = min(ev, evx * N);
    }
    //cout << P << '\n';
   // cout << 1.0 / (1.0 - P) << endl;
   // cout << ans << '\n';
    //  cout << setprecision(18) << ev << '\n';
    printf("%.6lf",ev);
}
int main(){
    ios::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL);
    int t; cin >> t; while(t--) solve();

}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 1ms
memory: 3832kb

input:

3
1 1 5000
1 1 1
1 2 10000

output:

4.00000010141.5852893.000000

result:

wrong output format Expected double, but "4.00000010141.5852893.000000" found