Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
96811 | 廖宸睿 | 闰年的数量 | C++ | Accepted | 1 MS | 272 KB | 334 | 2024-11-09 15:39:37 |
#include <iostream> #include <cstdio> using namespace std; bool a(int e){ if(e%100!=0&&e%4==0||e%400==0) return true; return false;} int main() { int x,y,z=0; cin>>x>>y; for(int i=x;i<=y;i++){ if(a(i)) z++;}cout<<z; return 0; }