编号 | 题目 | 状态 | 分数 | 总时间 | 内存 | 代码 / 答案文件 | 提交者 | 提交时间 |
---|---|---|---|---|---|---|---|---|
#46896 | #1007. G. 兼济天下 | Compile Error | 0 | 0 ms | 0 K | C++ / 408 B | 20183400682 | 2020-12-17 21:49:32 |
#include <iostream>
#include <cmath>
using namespace std;
int main() {
int T;
scanf("%d", &T);
while (T--) {
double n, m;
scanf("%lf%lf", &n, &m);
n -= 1.0;
double delta = (ceil(m / n) * n - m) * (n - 1) / n;
if (delta > 5e-7) {
printf("%.6lf\n", delta);
} else {
printf("CSFNB!\n");
}
}
}
编译信息
/sandbox/1/a.cpp: In function 'int main()':
/sandbox/1/a.cpp:8:5: error: 'scanf' was not declared in this scope
scanf("%d", &T);
^~~~~
/sandbox/1/a.cpp:8:5: note: suggested alternative: 'wscanf'
scanf("%d", &T);
^~~~~
wscanf
/sandbox/1/a.cpp:16:13: error: 'printf' was not declared in this scope
printf("%.6lf\n", delta);
^~~~~~
/sandbox/1/a.cpp:16:13: note: 'printf' is defined in header '<cstdio>'; did you forget to '#include <cstdio>'?
/sandbox/1/a.cpp:3:1:
+#include <cstdio>
/sandbox/1/a.cpp:16:13:
printf("%.6lf\n", delta);
^~~~~~
/sandbox/1/a.cpp:18:13: error: 'printf' was not declared in this scope
printf("CSFNB!\n");
^~~~~~
/sandbox/1/a.cpp:18:13: note: 'printf' is defined in header '<cstdio>'; did you forget to '#include <cstdio>'?