what?
查看原帖
what?
1293303
xuekaiyang楼主2024/4/3 16:42
#include<bits/stdc++.h>
using namespace std;
int x,y,z[1500],s;
int main(){
	cin>>x>>y;
	for(int i=x;i<=y;i++){
	       if(i%4==0&&i%100!=0||i%400==0){
		   	    s++;
		   	    z[s]=i;
		   }  
	}
	cout<<s<<endl;
	for(int i=1;i<=s;i++){
		cout<<z[i]<<" "; 
	}return 0;
}
2024/4/3 16:42
加载中...