#include<cstdio>
#include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<string>
#include<cstring>
#include<cmath>
#include<map>
#define ll long long
using namespace std;
int main()
{
int a,b,c,d,e,f,x,y,z;
while(scanf("%d.%d.%d %d.%d.%d",&a,&b,&c,&d,&e,&f)!=EOF)
{
if(c+f>=29)
{
z = c+f-29;
b++;
}
else z = c+f;
if(b+e>=17)
{
y = b+e-17;
a++;
}
else y = b+e;
x = a+d;
printf("%d.%d.%d\n",x,y,z);
}
return 0;
}
pat1058 A+B in Hogwarts
最新推荐文章于 2024-07-26 21:05:15 发布
