Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
74490 sh25_shenpy 画矩形 C++ 通过 1 MS 252 KB 582 2025-11-28 15:34:08

Tests(2/2):


#include <bits/stdc++.h> using namespace std; int main( ) { int m,n,k; char a; cin>>m>>n>>a>>k; if(k==0){ for(int i=1;i<=n-1;i++){ cout<<a; } cout<<a<<endl; for(int j=1;j<=m-2;j++){ cout<<a; for(int l=1;l<=n-2;l++){ cout<<" "; } cout<<a<<endl; } for(int o=1;o<=n-1;o++){ cout<<a; } cout<<a<<endl; } else{ for(int p=1;p<=m;p++){ for(int q=1;q<=n-1;q++){ cout<<a; } cout<<a<<endl; } } return 0; }


测评信息: