Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
128099 唐诗阳 打印反直角三角形 C++ Accepted 15 MS 272 KB 450 2025-08-01 20:03:57

Tests(10/10):


Code:

#include<iostream> #include<cstdio> //scanf()\printf() #include<cstring> #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int s=1,n,x; cin>>n; x=n-s; for(int i=1;i<=n;i++){ for(int k=1;k<=x;k++) cout<<' '; for(int j=1;j<=s;j++){ cout<<'*'; } x--; cout<<endl; s++; } return 0; }