文章
21
粉丝
76
获赞
1
访问
14.8k
#include<stdio.h>
int days[13] = {0,31,28,31,30,31,30,31,31,30,31,30,31};
int main(void){
int m;
int year,month,day,num;
scanf("%d",&m);
while(m--){
scanf("%d%d%d%d",&year,&month,&day,&num);
days[2] = ((year%4==0&&year%100!=0) || year%400==0)?29:28;
int sum = day+num;
int i = month;
while((sum-days[i])>0){
sum-=days[i++];
if(i<13){
month++;
}else{
...
登录后发布评论
暂无评论,来抢沙发