求大佬指点,提交仅40分,问题出在哪里了呢?
查看原帖
求大佬指点,提交仅40分,问题出在哪里了呢?
646545
封禁用户楼主2022/1/21 20:10
//源代码:
#include<bits/stdc++.h>
using namespace std;
int main(){
	int x,y;
	cin>>x>>y;
	cout<<(y-x)/4<<endl;
	//for(int i=x;i<=y;i++){
	while(x<=y){
		if(x%4==0){
			if(x%100==0){
 				if(x%400==0){
					cout<<x<<" ";
				}
			}
			else{
				cout<<x<<" ";
			}
		}
		x++;
	}
	return 0;
} 
//好无语啊,不知道问题在哪儿
2022/1/21 20:10
加载中...