编号 题目 状态 分数 总时间 内存 代码 / 答案文件 提交者 提交时间
#48292 #1007. G. 兼济天下 Accepted 100 4 ms 408 K C++ / 290 B 少年班94刘千瑀 2021-05-13 11:06:22
显示原始代码
#include <bits/stdc++.h>
using namespace std;
double n, m;
int main() {
    int t;
    cin >> t;
    while (t--) {
        cin >> n >> m;
        n--;
        double ans = (ceil(m / n) - m / n) * (n - 1);
        if (ans == 0)
            puts("CSFNB!\n");
        else
            printf("%.6lf\n", ans);
    }
    return 0;
}
子任务 #1
Accepted
得分:100
测试点 #1
Accepted
得分:100
用时:4 ms
内存:408 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>

用户输出

0.500000
CSFNB!

CSFNB!

CSFNB!

CSFNB!

999999997.000000
1.000000
9737972.368635
158.314655
999999997.000000

系统信息

Exited with return code 0