提交时间:2023-01-01 16:12:05
运行 ID: 3351
#include<iostream> #include<algorithm> #include<cstdio> #include<queue> #include<stack> #include<cstring> using namespace std; int main(){ int n; cin>>n; for(int i=1;i<=n;i++)cout<<'*'; cout<<'\n'; for(int i=1;i<=n-2;i++){ for(int j=1;j<=n-i-1;j++)cout<<' '; cout<<"*\n"; } for(int i=1;i<=n;i++)cout<<'*'; return 0; } /* #include<cstdio> freopen("文件名.in","r",stdin); freopen("文件名.out","w",stdout); */