#include <cstdio>
#include <iostream>
#include <cstring>
#include <algorithm>
#include <vector>
using namespace std;
long long change(long long a[]){
return a[0]*29*17+a[1]*29+a[2];
}
int main(){
//freopen("1.txt","r",stdin);
long long a[3],b[3],c[3];
scanf("%lld.%lld.%lld %lld.%lld.%lld",&a[0],&a[1],&a[2],&b[0],&b[1],&b[2]);
long long numa,numb,numc;
numa=change(a);
numb=change(b);
numc=numa+numb;
c[0]=numc/(29*17);
c[1]=(numc%(29*17))/29;
c[2]=(numc%(29*17))%29;
for (int i=0;i<3;i++){
cout<<c[i];
if(i!=2) cout<<".";
else cout<<endl;
}
return 0;
}
pat a1058
最新推荐文章于 2021-09-13 20:12:25 发布