This commit is contained in:
Michael Zhang 2021-01-14 23:50:07 -06:00
parent e43cd6f766
commit 1b32d390e4
Signed by: michael
GPG key ID: BDA47A31A3C8EE6B
3 changed files with 24 additions and 0 deletions

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
__pycache__
*.pyc

0
002.jl Normal file
View file

22
251.py Normal file
View file

@ -0,0 +1,22 @@
from tqdm import tqdm
L = 110_000_000
v = dict()
print("loading a's")
for a in tqdm(range(1, L + 1)):
k = 8 * a**3 + 15 * a**2 + 6 * a - 1
v[k] = a
ct = 0
print("loading b's and c's")
for b in tqdm(range(1, L + 1)):
for c in tqdm(range(1, L + 1)):
if b + c > L: continue
k = 27 * b*b * c
if k in v:
a = v[k]
if a + b + c > L: continue
# res.add((v[k], b, c))
ct += 1