11 条题解

  • -3
    @ 2022-7-6 19:08:17

    #include <stdio.h> #include #include <math.h> using namespace std; int main() { int n; cin >> n; for(int i = 1; i<=n ; i++) { for(int j = 1; j <= n - i ; j++) cout << " "; for(int j = 1; j <= 2i - 1; j++) cout << i; cout << endl; } for(int i =n-1; i >= 1 ; i--) { for(int j = 1; j <= n - i ; j++) cout << " "; for(int j = 1; j <= 2i - 1; j++) cout << i; cout << endl; } }

    信息

    ID
    960
    时间
    1000ms
    内存
    256MiB
    难度
    3
    标签
    递交数
    263
    已通过
    143
    上传者