文章
19
粉丝
21
获赞
5
访问
19.0k
// 输出格式一定要注意,太坑了!
# include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
int a[N];
void print(int x){
if (x < 10) cout << x << " ";
else if (x >= 10 && x < 100) cout << x << " ";
else if (x > 100) cout << x << " ";
}
int main (void){
int n;
cin >> n;
int idx = 1;
for (int i = 1; i <= n; ++i){
for (int j = 1; j <= i; ++j){
if (j == i){
cout << idx;
}else{
print(idx);
}
idx ++;
}
cout << endl;
}
return 0;
}
// 高精度模板题
# include <bits/stdc++.h>
using namespace std;
string Add(string a,string b){
int t = 0;
string ans;
for (int i = a.size() - 1,j = b.size() - 1; i >= 0 || ...
登录后发布评论
暂无评论,来抢沙发