第三个wa
查看原帖
第三个wa
523036
hsbsy楼主2022/5/17 21:09

代码第三个过不去,它输入了2004(闰年)返回(1),却返回wa为什么? 源码:

#include <bits/stdc++.h>
using namespace std;

int main() {
	
	int num=0;
	
	cin >> num;
	if(num%10==0&&num%400==0)
	{
		cout<<1;
	}else if(num%4==0)
	{
		cout<<1;
	}
    else{
    	cout<<0;
	}
	return 0;
}
2022/5/17 21:09
加载中...