| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 158681 | 王慕哲 | 18岁生日 | C++ | Compile Error | 0 MS | 0 KB | 820 | 2026-08-22 16:37:53 |
#include<bits/stdc++.h> using namespace std; bool r(int y){ if((y%4==0 && y%100!=0) || y%400){ return 1; } return 0; } int main(){ int T; cin>>T; while(T--){ int a,b,c; char c; if(!run(a+18) && b==2 && c==29){ cout<<-1<<endl; continue; } int d=0; for(int i=a;i<a+18;i++){ if(b<=2){ if(r(i)){ d+=366; } else{ d+=365; } } else{ if(r(i+1)){ d+=366; } else{ d+=365; } } } cout<<d<<endl; } return 0; }
Main.cc: In function 'int main()':
Main.cc:14:14: error: conflicting declaration 'char c'
char c;
^
Main.cc:13:17: note: previous declaration as 'int c'
int a,b,c;
^
Main.cc:15:21: error: 'run' was not declared in this scope
if(!run(a+18) && b==2 && c==29){
^