Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
7180 李成蹊 画矩形 C++ 输出格式错误 0 MS 248 KB 488 2023-02-01 14:54:22

Tests(0/1):


#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; }


测评信息: