求助,输出没错但是wa
查看原帖
求助,输出没错但是wa
1404086
THEONE_k楼主2024/7/31 12:04

除了第四个ac其他都是wa

#include <bits/stdc++.h>
using namespace std;
int main()
{
	int n;
	cin>>n;
	
	for(int i = 1;i<=n;i++)
	{
		for(int j = 1;j<=n;j++)
		{
			cout<<setfill('0')<<setw(2)<<(i-1)*4+j;
		}
		cout<<endl;
	}
	cout<<endl;
	
	int t=1;
	for(int i = 1;i<=n;i++)
	{
		for(int j = 1;j<=n-i;j++)
		{
			cout<<"  ";
		}
		for(int j = 1;j<=i;j++)
		{
			cout<<setfill('0')<<setw(2)<<t;
			t++;
		}
		cout<<endl;
	}
	return 0;
}
2024/7/31 12:04
加载中...