| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 46439 | 杨中琦 | 判断某年某月天数 | C++ | Accepted | 100 | 0 MS | 256 KB | 521 | 2022-07-13 13:18:49 |
#include<bits/stdc++.h> using namespace std; int main(){ int year,month; cin>>year>>month; if(month==1) cout<<31; if(month==2){ if(year%4==0){ if(year%100==0&&year%400!=0) cout<<28; else cout<<29; }else{ cout<<28; } } if(month==3) cout<<31; if(month==4) cout<<30; if(month==5) cout<<31; if(month==6) cout<<30; if(month==7) cout<<31; if(month==8) cout<<31; if(month==9) cout<<30; if(month==10) cout<<31; if(month==11) cout<<30; if(month==12) cout<<31; return 0; }