3 条题解

  • 2
    @ 2023-12-2 10:15:31
    #include<bits/stdc++.h>
    using namespace std;
    int main(){
        cout<<"   1   "<<endl;
        cout<<"  123  "<<endl;
        cout<<" 12345 "<<endl;
        cout<<"1234567";
        return 0;
    }
    
    • 0
      @ 2023-7-19 16:15:27
      #include<bits/stdc++,h>
      using namespace std;
      int main(){
      	int n;
      	cin>>n;
      	for(int i=0;i<=n;i++){
      		for(int j=0;j<n-i; j++)
      			cout << " ";
      		for(int j=0;j<i*2-1;j++)
      			cout<<j+1;
      		cout<<endl;
      	}
      	return 0;
      }
      
      • 0
        @ 2023-7-16 10:16:33
        #include <bits/stdc++.h>
        using namespace std;
        int main() {
        	int n;
        	cin >> n;
        	for (int  i = 0; i <= n; i++) {
        		for (int j = 0; j < n - i ; j++)
        			cout << " ";
        
        		for (int j = 0; j <  i * 2 - 1; j++)
        			cout << j + 1;
        
        		cout << endl;
        	}
        	return 0;
        }
        
        • 1

        信息

        ID
        73
        时间
        1000ms
        内存
        16MiB
        难度
        4
        标签
        递交数
        392
        已通过
        190
        上传者