Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
146000 王梓宇 08有几个闰年 C++ Accepted 0 MS 272 KB 565 2026-01-25 20:11:13

Tests(10/10):


Code:

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; bool a1(long long n){ if((n%4==0&&n%100!=0)||n%400==0){ return true; }else{ return false; } } int main(){ long long a,b,c,d=0; cin>>a>>b>>c; if(a1(a)) d++; if(a1(b)) d++; if(a1(c)) d++; cout<<d; return 0; }