Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
58490 | 王一涵(吃土豆长大的马铃薯) | 画矩形 | C++ | Accepted | 1 MS | 256 KB | 332 | 2024-12-11 17:17:18 |
#include<iostream> using namespace std; int main(){ int a,h; char c; bool b; cin>>h>>a>>c>>b; for(int i=1;i<=h;i++){ for(int j=1;j<=a;j++){ if(b==0){ if(i==1||i==h||j==1||j==a) cout<<c; else cout<<" "; }else cout<<c; } cout<<endl; } return 0; }