小雪 • 1个月前
using namespace std;
int main() {
int x, y; cin >> x >> y; int c = 0; for (int i = x; i <= y; i++) { if ((i % 400 == 0) || (i % 4 == 0 && i % 100 != 0)) { c = c + 1; } } cout << c; return 0;
}
评论:
请先登录,才能进行评论