Run ID | 作者 | 问题 | 语言 | 测评结果 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
50887 | fengxiaohang | 对齐输出 | C++ | 输出格式错误 | 1 MS | 244 KB | 380 | 2024-09-15 11:40:24 |
#include <iostream> #include <iomanip> int main() { int a, b, c; // 读入三个整数 std::cin >> a >> b >> c; // 按照要求,每个整数右对齐,占7个字符宽度,且以空格分隔 std::cout << std::setw(7) << a << " " << std::setw(7) << b << " " << std::setw(7) << c << std::endl; return 0; }