| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 89822 | zhouyuchen | 调整三位数,使其值最大 | C++ | Wrong Answer | 0 | 0 MS | 248 KB | 748 | 2024-01-30 09:45:10 |
#include<bits/stdc++.h> using namespace std; int main(){ int y,m; cin>>y>>m; if(((y%4==0&&y%100!=0)||(y%400==0))&&(m==2)){ cout<<29; } if((!((y%4==0&&y%100!=0)||(y%400==0)))&&(m==2)){ cout<<28; } else if((!((y%4==0&&y%100!=0)||(y%400==0)))){ switch(m){ case(1): cout<<31; break; case(3): cout<<31; break; case(4): cout<<30; break; case(5): cout<<31; break; case(6): cout<<30; break; case(7): cout<<31; break; case(8): cout<<31; break; case(9): cout<<30; break; case(10): cout<<31; break; case(11): cout<<30; break; case(12): cout<<31; break; } } return 0; }