Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
5376 D班-陈颖钧 菱形 C++ 解答错误 0 1 MS 260 KB 461 2025-02-06 14:22:35

Tests(0/5):


#include<bits/stdc++.h> using namespace std; int main(){ int i,n,j,k; cin>>n; for(i=1;i<=n;i++){ for(j=1;j<=n-i;j++){ cout<<' '; } for(k=1;k<=i*2-1;k++){ cout<<"*"; } cout<<endl; } for(i=1;i<=n;i++){ for(j=1;j<=n-i;j++){ cout<<' '; } for(k=1;k<=i*2-1;k++){ cout<<"*"; } cout<<endl; } }


测评信息:

输入

10

输出

         *
***
*****
*******
*********
***********
*************
***************
*****************
*******************
*
***
*****
**...

答案

         *
***
*****
*******
*********
***********
*************
***************
*****************
*******************
*****************
***************
****...

系统信息

exit code: 0, checker exit code: 0