QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#506159 | #6423. Fireworks | PonyHex | WA | 6ms | 3784kb | C++14 | 428b | 2024-08-05 15:45:40 | 2024-08-05 15:45:40 |
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;
}
详细
Test #1:
score: 0
Wrong Answer
time: 6ms
memory: 3784kb
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'