破防了
查看原帖
破防了
970515
Warriors_Curry楼主2024/5/1 16:20

写了个代码,给自己调破防了

#include<bits/stdc++.h> 
#define ll long long
#define ss string
using namespace std;
int main()
{
	ll a,eno,tot=1,test;
	eno=a;
	test=eno;
	cin>>a;
	for(int i=0;i<a;i++)
	{
		for(int i=0;i<test;i++)
		{
			if(tot<10) 
			{
				cout<<0<<tot;
				tot++; 
			}
			else
			{
				cout<<tot;
				tot++;
			}
		}
		for(int i=0;i<(a-test);i++) cout<<" ";
		test-=1;
		cout<<endl;
		
	}
	cin>>a;
	
}
2024/5/1 16:20
加载中...