编号 题目 状态 分数 总时间 内存 代码 / 答案文件 提交者 提交时间
#103391 #1007. G. 兼济天下 Wrong Answer 0 4 ms 248 K C++ / 798 B u 2024-03-17 22:44:49
显示原始代码
#include <bits/stdc++.h>
using namespace std;
int main() {
    int t, n, m;
    double s;
    cin >> t;
    for (int i = 0; i < t; i++) {
        cin >> n >> m;
        s = ((m / (n - 1) + 1) - ((double)m / (n - 1))) * (n - 2);
        if (s <= 0 || s == ceil(s)) {
            printf("CSFNB!\n");
        } else {
            printf("%.6llf\n", s);
        }
    }
    return 0;
}

/*
#include <iostream>
#include <math.h>
using namespace std;

int main() {
    int i;
    cin >> i;
    int j[i], k[i];
    double w[i];
    for (int n = 0; n < i; n++) {
        cin >> j[n] >> k[n];
        j[n]--;
        w[n] = ((ceil((double)k[n] / j[n]) - (double)k[n] / j[n])) * (j[n] - 1);
    }
    for (int n = 0; n < i; n++) {
        if (w[n] <= 0) {
            cout << "CSFNB!" << endl;
        } else {
            printf("%.6f\n", w[n]);
        }
    }

    return 0;
}*/
子任务 #1
Wrong Answer
得分:0
测试点 #1
Wrong Answer
得分:0
用时:4 ms
内存:248 KiB

输入文件(1.in

10
3 17
4 21
2 0
2 1000000000
1000000000 999999999
1000000000 1000000000
1000000000 999999998
154236
<37 bytes omitted>

答案文件(1.ans

0.500000
CSFNB!
CSFNB!
CSFNB!
CSFNB!
999999997.000000
1.000000
9737972.368635
158.314655
99
<16 bytes omitted>

用户输出

nan
CSFNB!
CSFNB!
CSFNB!
CSFNB!
-nan
-nan
-nan
-nan
CSFNB!

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0