HELP
查看原帖
HELP
1420447
shizobo605楼主2024/9/19 22:33

样例过了,但是0分

#include <bits/stdc++.h> 
using namespace std;
int main(){
	int a,b,f;
	char c;
	cin>>a>>b>>c>>f;
	int s[a][b];  
	if (f==0 and f!=1){
		for (int i=0;i<=a;i++){
			for (int j=0;j<=b;j++){
				cout<<c;
			}
			cout<<endl;
		} 
	}
	else {
		for(int i=0;i<b;i++)cout<<c;
        cout<<endl;
        for(int i=0;i<a-2;i++){
            cout<<c;
            for(int j=0;j<b-2;j++)cout<<' ';
            cout<<c<<endl;
        }
        for(int i=0;i<b;i++)cout<<c;
	}
	return 0;
}

大佬帮我QaQ

2024/9/19 22:33
加载中...