mirror of
https://github.com/Alexander-D-Karpov/scripts.git
synced 2025-01-22 22:54:08 +03:00
19 lines
380 B
Python
19 lines
380 B
Python
|
def _(n, p, d=16):
|
||
|
return n * d ** (p - 1)
|
||
|
|
||
|
|
||
|
r = []
|
||
|
|
||
|
for x in range(16):
|
||
|
for y in range(16):
|
||
|
for z in range(1000):
|
||
|
n1 = _(5, 4) + _(x, 1) + 7
|
||
|
n2 = _(3, 2) + _(y, 1) + 1
|
||
|
n3 = _(1, 6, z) + _(2, 5, z) + _(6, 1, z) + 5
|
||
|
|
||
|
if n1 + n2 == n3:
|
||
|
print(x, y, z)
|
||
|
r.append(x * y * z)
|
||
|
|
||
|
print(max(r))
|