'commit'
This commit is contained in:
20
TangDou/CSP-J/J2_2020/ZhuanTi_BiaoDaShi/Tree/TD.cpp
Normal file
20
TangDou/CSP-J/J2_2020/ZhuanTi_BiaoDaShi/Tree/TD.cpp
Normal file
@@ -0,0 +1,20 @@
|
||||
#include <bits/stdc++.h>
|
||||
|
||||
using namespace std;
|
||||
int main() {
|
||||
int a, b, c, d, x, e, y;
|
||||
cin >> a >> b >> c >> d >> x >> e >> y;
|
||||
|
||||
for (int i = 1; i <= 500; i++)
|
||||
for (int j = 1; j <= 500; j++)
|
||||
for (int k = 1; k <= 500; k++)
|
||||
if (i + j * b == a * k * b && i + j * d == c * k * d) {
|
||||
for (int u = 1; u <= 500; u++)
|
||||
if (u * x * k + (u - e) * y * k == (x + y) * j + i) {
|
||||
cout << u << endl;
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user