QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#506148 | #6423. Fireworks | jinfuyu | WA | 6ms | 4040kb | C++14 | 403b | 2024-08-05 15:42:46 | 2024-08-05 15:42:47 |
Judging History
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;
}
Details
Tip: Click on the bar to expand more detailed information
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'