没得别的说法,就是水题!

#include<bits/stdc++.h>
using namespace std;
int a[3],b[3],c[3]={0,17,29};
void solve(){
    scanf("%d.%d.%d %d.%d.%d",&a[0],&a[1],&a[2],&b[0],&b[1],&b[2]);
    int up = 0;
    for(int i=2;i>=0;i--){
        int base = a[i]+b[i]+up;
        if(i==0){
            a[i] = base;
            break;
        }
        a[i] = base%c[i];
        up = base/c[i];
    }
    printf("%d.%d.%d",a[0],a[1],a[2]);
}
int main(){
    solve();
    return 0;
}