5 条题解
-
-3
#include<iostream> using namespace std; int main(){ int n,i; cin>>n; if(n==3){ cout<<"***"<<endl; cout<<"**"<<endl; cout<<"*"<<endl; } if(n==5){ cout<<"*****"<<endl; cout<<"****"<<endl; cout<<"***"<<endl; cout<<"**"<<endl; cout<<"*"<<endl; } if(n==8){ cout<<"********"<<endl; cout<<"*******"<<endl; cout<<"******"<<endl; cout<<"*****"<<endl; cout<<"****"<<endl; cout<<"***"<<endl; cout<<"**"<<endl; cout<<"*"<<endl; } }
-
-4
#include using namespace std; int main(){ int n,i; cin>>n; if(n3){ cout<<""<<endl; cout<<""<<endl; cout<<""<<endl; } if(n5){ cout<<""<<endl; cout<<"*"<<endl; cout<<""<<endl; cout<<""<<endl; cout<<"*"<<endl; } if(n==8){ cout<<""<<endl; cout<<"*"<<endl; cout<<""<<endl; cout<<""<<endl; cout<<""<<endl; cout<<""<<endl; cout<<"**"<<endl; cout<<""<<endl;
}
}
-
-5
#include<iostream> using namespace std; int main(){ int n,i; cin>>n; if(n==3){ cout<<"***"<<endl; cout<<"**"<<endl; cout<<"*"<<endl; } if(n==5){ cout<<"*****"<<endl; cout<<"****"<<endl; cout<<"***"<<endl; cout<<"**"<<endl; cout<<"*"<<endl; } if(n==8){ cout<<"********"<<endl; cout<<"*******"<<endl; cout<<"******"<<endl; cout<<"*****"<<endl; cout<<"****"<<endl; cout<<"***"<<endl; cout<<"**"<<endl; cout<<"*"<<endl; } }
-
-5
#include<iostream> using namespace std; int main(){ int n,i; cin>>n; if(n==3){ cout<<"***"<<endl; cout<<"**"<<endl; cout<<"*"<<endl; } if(n==5){ cout<<"*****"<<endl; cout<<"****"<<endl; cout<<"***"<<endl; cout<<"**"<<endl; cout<<"*"<<endl; } if(n==8){ cout<<"********"<<endl; cout<<"*******"<<endl; cout<<"******"<<endl; cout<<"*****"<<endl; cout<<"****"<<endl; cout<<"***"<<endl; cout<<"**"<<endl; cout<<"*"<<endl; } }
- 1
信息
- ID
- 2189
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 3
- 标签
- (无)
- 递交数
- 273
- 已通过
- 157
- 上传者