QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#506159#6423. FireworksPonyHexWA 6ms3784kbC++14428b2024-08-05 15:45:402024-08-05 15:45:40

Judging History

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

  • [2024-08-05 15:45:40]
  • 评测
  • 测评结果:WA
  • 用时:6ms
  • 内存:3784kb
  • [2024-08-05 15:45:40]
  • 提交

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'