QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#506148#6423. FireworksjinfuyuWA 6ms4040kbC++14403b2024-08-05 15:42:462024-08-05 15:42:47

Judging History

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

  • [2024-08-05 15:42:47]
  • 评测
  • 测评结果:WA
  • 用时:6ms
  • 内存:4040kb
  • [2024-08-05 15:42:46]
  • 提交

answer

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

int main()
{
    int t;
    cin>>t;
    while(t--){
        long double n,m,p;
        cin>>n>>m>>p;
        p/=10000;
        long double mi=1e9;
        for(int i=1;i<=10000;i++){
            long double d=(n*i+m)/(1-pow(1-p,i));
            mi=min(mi,d);
            
        }
        printf("%.10lf\n",mi);
    }
    return 0;
}


詳細信息

Test #1:

score: 0
Wrong Answer
time: 6ms
memory: 4040kb

input:

3
1 1 5000
1 1 1
1 2 10000

output:

-0.0000000000
-nan
-nan

result:

wrong answer 1st numbers differ - expected: '4.00000', found: '-0.00000', error = '1.00000'