Run ID | 作者 | 问题 | 语言 | 测评结果 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
7649 | ethan_yuan | 画矩形 | C++ | 通过 | 1 MS | 248 KB | 663 | 2023-02-05 20:55:59 |
#include<iostream> #include<cstdio> #include<cmath> using namespace std; int main() { int a,b; bool x; int i,j; char c; cin>>a>>b; cin>>c; cin>>x; if(x) { for(i=1;i<=a;i++) { for(j=1;j<=b;j++) cout<<c; cout<<endl; } } else { for(i=1;i<=a;i++) { for(j=1;j<=b;j++) { if((i==1)||(i==a)||(j==1)||(j==b)) cout<<c; else cout<<" "; } cout<<endl; } } cout<<endl; return 0; }