Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
324361 | 丁虞轩 | 【C3-T】九九乘法表 | C++ | 输出格式错误 | 0 | 2 MS | 260 KB | 441 | 2025-05-27 20:25:17 |
#include <iostream> #include <iomanip> // 用于格式化输出 using namespace std; int main() { int n; cin >> n; cout<<setw(3)<<"*"<<setw(3); for(int j=1;j<=n;j++){ cout<<setw(3)<<j<<setw(3); } for (int i = 1; i <= n; ++i) { cout <<endl<< setw(3) << i ; for (int j = 1; j <= n; ++j) { if(j<=i)cout << setw(3) << i * j; } cout << endl; } return 0; }