幸运月通过代码#include <bits/stdc .h>using namespace std;int m[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};int _is(int x){ if(x%400==0) return 1; if(x%100==0) return 0; if(x%4==0) return 1; return 0;}int x,y;int main(){ int N; scanf("%d",&N); while(N--){ scanf("%d%d",&x,&y); if(_is(x)) m[2]=29; else m[2]=28; int ans=0; for(int i=1;i<=13;i ) if(m[i]>y) ans ; printf("%d\n",ans); }}
点赞 评论

相关推荐

求offer的大角牛:不吃香菜
点赞 评论 收藏
分享
牛客网
牛客网在线编程
牛客网题解
牛客企业服务