| Run ID | 作者 | 问题 | 语言 | 测评结果 | 时间 | 内存 | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 79859 | sh25_huangse | 保留3位小数的浮点数 | C++ | 通过 | 0 MS | 248 KB | 328 | 2026-01-04 14:48:23 |
#include <iostream> #include <iomanip> // 包含 setprecision 和 fixed 操作符 using namespace std; int main() { float num; // 题目要求是单精度浮点数 cin >> num; // 设置输出格式为固定小数,并保留3位小数 cout << fixed << setprecision(3) << num << endl; return 0; }