Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
6479 huangyunkai 画矩形 C++ 解答错误 0 MS 248 KB 548 2023-01-24 16:55:20

Tests(0/1):


#include<bits/stdc++.h> using namespace std; int main(){ int a,b; char c; bool d; cin>>a>>b>>c>>d; if(d==1){ for(int i=1;i<=a;i++){ for(int j=1;j<=b;j++) cout<<c; cout<<endl; } } else{ for(int i=1;i<=b;i++) cout<<c; for(int i=1;i<=a-2;i++){ cout<<c; for(int j=1;j<=b-1;j++) cout<<" "; cout<<c<<endl; } for(int i=1;i<=b;i++) cout<<c; } return 0; }


测评信息: