[求助]编译失败
查看原帖
[求助]编译失败
432713
mspw楼主2021/11/19 19:46

本地可以,扔到洛谷上编译失败,什么原因也没提

#include<bits/stdc++.h>
using namespace std;
queue<int> y;
bool isrn(int n)
{
	if(n%4==0)
	{
		if(n%400!=0) return 0;
		return 1;
	}
	return 0;
}
int main()
{
	int m,n;
	cin>>m>>n;
	while(!isrn(m)) m++;
	for(int i=m;i<=n;i+=4)
	y.push(i);
	cout<<y.size()<<endl;
	while(!y.empty())
	{
		cout<<y.front()<<' ';
		y.pop();
	}
	return 0;
}

2021/11/19 19:46
加载中...