90分求助
查看原帖
90分求助
1055973
yuchanghong楼主2025/7/24 16:02
#include<bits/stdc++.h>
using namespace std;
int n;
int main() {
	cin >> n;
	if( n % 4 == 0&& n % 100 != 0) {
		cout << "Yes" << endl;
	} else if( n % 100 == 0 && n % 400 != 0) {
		cout << "No" << endl; 
	} else if( n % 400 == 0 && n % 3200 != 0) {
		cout << "Yes" << endl;
	} else if( n % 3200 == 0 && n % 172800 != 0) {
		cout << "No" << endl;
	} else if( n % 172800 == 0) {
		cout << "Yes" << endl;
	}
	return 0;
} 

#include<bits/stdc++.h> using namespace std; int n; int main() { cin >> n; if( n % 4 == 0&& n % 100 != 0) { cout << "Yes" << endl; } else if( n % 100 == 0 && n % 400 != 0) { cout << "No" << endl; } else if( n % 400 == 0 && n % 3200 != 0) { cout << "Yes" << endl; } else if( n % 3200 == 0 && n % 172800 != 0) { cout << "No" << endl; } else if( n % 172800 == 0) { cout << "Yes" << endl; } return 0; }

2025/7/24 16:02
加载中...