Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
7573 李成蹊 画矩形 C++ 通过 0 MS 248 KB 488 2023-02-04 22:13:09

Tests(2/2):


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


测评信息: