18分代码,不知道哪里扣了2分
#include <iostream>
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
int main(int argc, char** argv) {
int a, b, c;
int x, y, z;
scanf("%d.%d.%d %d.%d.%d", &a, &b, &c, &x, &y, &z);
long long int count = 0;
count = a * 17 * 29 + b * 29 + c + x * 17 * 29 + y * 29 + z;
a = count / (17 * 29);
b = (count % (17 * 29)) / 29;
c = count - (a * 17 * 29 + b * 29);
printf("%d.%d.%d", a, b, c);
return 0;
}