18 条题解
-
1
#include <iostream> using namespace std; short n; int main() { cin >> n; short fir = n - 1,las = 0; for (int i = 0;i <= n - 1;i++) { for (int j = 1;j <= fir;j++) cout << ' '; for (int j = 1;j <= n;j++) cout << '@'; for (int j = 1;j <= las;j++) cout << ' '; cout << endl; fir--; las++; } return 0; } -
1
// // @@@@@ // @@@@@ // @@@@@ // @@@@@ //@@@@@ // // #include<iostream> //#include<iomanip> //#include<math.h> using namespace std; int n; int main(){ cin >> n; for(int i = 1; i <= n; i++){ for(int j = 1; j <= n - i; j++){ cout << " "; } for(int j = 1; j <= n; j++){ cout << "@"; } cout << endl; } return 0; } -
-2
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include <bits/stdc++.h>
#define LL long long
const int N = 1e5 + 10;
const int INF = 0x3f3f3f3f;
using namespace std;
int main(){
int n;
cin>>n;
for(int i=1;i<=n;i++){
for(int j=i;j<=n-1;j++)cout<<"";
for(int j=1;j<=n;j++)cout<<"@";
cout<<endl;
}
return 0;
}
- 1
信息
- ID
- 955
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- 5
- 标签
- 递交数
- 1003
- 已通过
- 370
- 上传者