| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 158700 | 郦辰希 | 18岁生日 | C++ | Compile Error | 0 MS | 0 KB | 728 | 2026-08-22 16:45:36 |
#include<bits/stdc++.h> using namespace std; bool run(y){ if(y%400==0 || (y%100==0 && y%4==0)){ return 1; } return 0; } int main(){ int year,month,date,days=0,T; cin>>T; for(int i=1;i<=T;i++){ days=0; cin>>year>>month>>date; if(!run(year+18) && month==2 && date==29){ cout<<-1<<"\n"; continue; } for(int x=year;x<year+18;x++){ if(run(i) && month<=2){ days+=366; } else if(run(i+1) && month>2){ days+=366; } else{ days+=365; } } cout<<days; } }
Main.cc:3:10: error: 'y' was not declared in this scope
bool run(y){
^
Main.cc:3:12: error: expected ',' or ';' before '{' token
bool run(y){
^