#include<iostream>
#include<string>
using namespace std;
int main()
{
int a[3], b[3], c[3];
char ch;
cin >> a[0] >> ch >> a[1] >> ch >> a[2] >> b[0] >> ch >> b[1] >> ch >> b[2];
int ka = (17 * a[0] + a[1]) * 29 + a[2];
int kb = (17 * b[0] + b[1]) * 29 + b[2];
int res = kb - ka;
if (res < 0)
{
res = -res;
cout << "-";
}
c[0] = res / 29 / 17;
c[1] = res / 29 % 17;
c[2] = res % 29;
cout << c[0] << "." << c[1] << "."<<c[2] << endl;
system("pause");
return 0;
}
PAT 乙级 1037 在霍格沃茨找零钱 (20分)
最新推荐文章于 2022-09-22 08:00:00 发布