https://pintia.cn/problem-sets/994805260223102976/problems/994805284923359232
简单题~
#include<iostream>
using namespace std;
int main() {
int sign = 1;
long int g1, s1, k1, g2, s2, k2, sum1, sum2;
long int g=0, s=0, k;
scanf("%ld.%ld.%ld %ld.%ld.%ld", &g1, &s1, &k1, &g2, &s2, &k2);
sum1 = g1*17*29+s1*29+k1;
sum2 = g2*17*29+s2*29+k2;
k = sum2 - sum1;
if(k<0){
sign = -1;
k = -k;
}
while(k>=29){
s ++;
k -= 29;
if(s==17){
g ++;
s -= 17;
}
}
if(sign==1){
printf("%ld.%ld.%ld", g, s, k);
}else{
printf("-%ld.%ld.%ld", g, s, k);
}
}