1 条题解

  • 3
    @ 2025-1-16 15:18:09
    #include<iostream>
    using namespace std;
    int main(){
    	int n;
    	cin >> n;
    	for (int i = 1; i <= n; i++)
    		cout << "*";
    	cout << endl;
    	for (int j = 1; j <= n; j++){
    		cout << "*";
    		for (int p = 1; p <= n - 2; p++)
    			cout << " ";
    		cout << "*";
    		cout << endl;
    	}
    	for (int i = 1; i <= n; i++)
    		cout << "*";
    	return 0;
    } 
    
    • 1

    信息

    ID
    45
    时间
    1000ms
    内存
    256MiB
    难度
    4
    标签
    递交数
    215
    已通过
    104
    上传者