2 条题解

  • 0
    @ 2025-7-11 18:17:46

    #include <bits/stdc++.h> using namespace std;

    int main() { int n; cin >> n; for(int i = 1; i <= n; i++) { cout << setw(n - i + 1) ; for(int j = 1; j <= 2 * i - 1 ; j++) { cout << j; } cout << endl; } for(int i = n - 1; i >= 1; i--) { cout << setw(n - i + 1) ; for(int j = 1; j <= 2 * i - 1 ; j++) { cout << j; } cout << endl; } return 0; }

    信息

    ID
    160
    时间
    1000ms
    内存
    64MiB
    难度
    8
    标签
    递交数
    11
    已通过
    8
    上传者