文章
64
粉丝
100
获赞
4
访问
37.4k
#include <bits/stdc++.h>
using namespace std;
int main()
{
int m;//输入个数
int year,month,day;
int a[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
scanf("%d",&m);
for(int i=0;i<m;i++)
{
scanf("%d %d %d",&year,&month,&day);
day=day+1;
if(a[month]<day)
{
month=month+1;
day=day%a[month-1];
}
printf("%d-%02d-%02d\n",year,month,day);
}
...
登录后发布评论
暂无评论,来抢沙发