Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
39058 yuzhengxun 画矩形 C++ 通过 1 MS 252 KB 489 2024-01-30 15:27:54

Tests(2/2):


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


测评信息: