基本思想:
进制转换,没什么可说的;
关键点:
无;
#include<iostream> #include<stdlib.h> #include<stdio.h> #include<vector> #include<string> #include<math.h> #include<algorithm> using namespace std; using std::vector; int main() { int a, b, c, e, d, f; scanf("%d.%d.%d %d.%d.%d", &a, &b, &c, &d, &e, &f); a = a + d; b = b + e; c = c + f; if (c >= 29) { c -= 29; b++; } if (b >= 17) { b -= 17; a++; } printf("%d.%d.%d", a, b, c); system("pause"); return 0; }