QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#198974 | #6423. Fireworks | rsj | WA | 1ms | 3684kb | C++14 | 355b | 2023-10-03 19:51:38 | 2023-10-03 19:51:38 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
using ld = long double;
void get() {
long double n,m,p,i,ans=1e18,dt;
cin>>n>>m>>p;
dt=1;
for(i=1;i<=1000000;i++) {
dt*=1-p/10000;
if((n*i+m)/(1-dt)<=ans) break;
ans=min(ans,(n*i+m)/(1-dt));
}
printf("%.10Lf\n",ans);
}
int main() {
int T; cin>>T;
while(T--) get();
return 0;
}
詳細信息
Test #1:
score: 0
Wrong Answer
time: 1ms
memory: 3684kb
input:
3 1 1 5000 1 1 1 1 2 10000
output:
1000000000000000000.0000000000 1000000000000000000.0000000000 1000000000000000000.0000000000
result:
wrong answer 1st numbers differ - expected: '4.00000', found: '1000000000000000000.00000', error = '250000000000000000.00000'