#include<iostream>
#include<algorithm>
#include<vector>
#include<map>
#include<string>
#include<set>
#include<stack>
#include<queue>
using namespace std;
int main(){
int a3,a2,a1,b3,b2,b1,s3,s2,s1;
int carry;
scanf("%d.%d.%d %d.%d.%d",&a3,&a2,&a1,&b3,&b2,&b1);
int temp = a1 + b1;
s1 = temp % 29;
carry = temp / 29;
temp = a2 + b2 + carry;
s2 = temp % 17;
carry = temp /17;
temp = a3 + b3 + carry;
s3 = temp;
printf("%d.%d.%d",s3,s2,s1);
}
1058. A+B in Hogwarts (20)
最新推荐文章于 2022-03-01 16:06:52 发布