| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 64281 | 彭慕允 | 闰年的数量 | C++ | Compile Error | 0 MS | 0 KB | 293 | 2024-01-21 12:01:21 |
#include<bits/stdc++.h> using namespace std; int rn(int n) { if(n%400==0||(n%4==0&&n%100 !=0)) { return 1; } else { return 0; } } int main() { int x ,y; int sum=0; cin>>x>>y; for(int i=x; i<=y; i++) { if(n(i)==1) { sum++; } } cout<<sum; return 0; }
Main.cc: In function 'int main()':
Main.cc:17:9: error: 'n' was not declared in this scope
if(n(i)==1) {
^