第37836题 判断题
如下 C++ 代码执行时如输入 5,将输出代码后的字符图形。
int n;
cin >> n;
for (int i = 1; i < n + 1; i++) {
for (int j = 1; j < n - i + 1; j++)
cout << 0;
for (int k = 1; k < 2 * i; k++) {
if (k <= i)
cout << k;
    else
            cout << 2 * i - k;
    }
    for (int j = 1; j < n - i + 1; j++)
        cout << 0;
    cout << endl;
}
000010000
000121000
001232100
012343210
123454321
{{ option.label }}
子题{{ index + 1 }} {{ child.type_label }}
{{ option.label }}
✓ 正确 ◐ 部分正确 ✗ 错误
程序运行统计
暂无判题统计
知识点:
提交{{ questionInfo.stats ? questionInfo.stats.submit_count : 0 }}次 正确率{{ statsAccuracy }}%
答案解析