求助
查看原帖
求助
1398944
lyc_77777楼主2024/8/6 18:03

请问为什么#5是RE啊?

#include <iostream>
using namespace std;


int main()
{
	int x,y;
	int a = 0;
	int b[100];
	cin >> x >> y;
	for (int i = x; i <= y; i++)
	{
		if (i % 4 == 0&&i%100!=0||i%400==0)
		{
			b[a] = i;
			a++;
		}
	}
	cout << a << endl;
	for(int i = 0;i<a;i++)
	{
		cout << b[i] << ' ';
	}
	return 0;
}
2024/8/6 18:03
加载中...