2 条题解
-
2
陈梓豪 (陈梓豪1) LV 7 @ 2024-07-10 07:51:42
一月又一月晕晕晕晕晕晕晕晕晕晕晕晕晕晕晕晕晕晕晕晕晕晕晕晕晕晕晕晕晕晕晕晕晕晕晕晕晕晕晕晕晕晕晕晕晕晕晕晕晕晕晕晕晕
-
02025-03-29 18:07:33@
#include<iostream>
int mo[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
using namespace std;
int main()
{
int a,b,c,i;
cin>>a>>b>>c;
for(i=1;i<=10000;i++)
{
c++;
if(a%4==0&&b==2)
{
if(c>29)
{
c=1;
b++;
}
}
else
if(c>mo[b])
{
c=1;
b++;
if(b>12)
{
b=1;
a++;
}
}
}
cout<<a<<"-"<<b<<"-"<<c;
return 0;
}
- 1