| Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|---|
| 444000 | 小林老师 | 【C1-9】计算浮点数相除的余数 | C++ | 通过 | 100 | 2 MS | 244 KB | 298 | 2026-06-07 18:55:30 |
#include <iostream> #include <cmath> // 用于 floor 函数 #include <iomanip> // 用于保留小数 using namespace std; int main() { double a, b, r; int k; cin >> a >> b; k = a / b; r = a - k * b; cout << fixed << setprecision(4) << r << endl; return 0; }