bilingual-math-code-verification-v1 / code /math_code_005_solution.py
efe-T's picture
Upload folder using huggingface_hub
93237a0 verified
Raw History Blame Contribute Delete
326 Bytes
from math import sqrt
x = 10 - 2 * sqrt(7)
volume = x * (36 - 2 * x) * (24 - 2 * x)
derivative = 864 - 240 * x + 12 * x * x
assert 0 < x < 12 and abs(derivative) < 1e-8
assert volume > 0
result = {"cut_cm": round(x, 6), "volume_cm3": round(volume, 6)}
import json
print(json.dumps(result, ensure_ascii=False, sort_keys=True))