bilingual-math-code-verification-v1 / code /math_code_015_solution.py
efe-T's picture
Upload folder using huggingface_hub
93237a0 verified
Raw History Blame Contribute Delete
431 Bytes
from fractions import Fraction
total = 5 * 5 * 4 * 3
ending_zero = 5 * 4 * 3
ending_five = 4 * 4 * 3
divisible = ending_zero + ending_five
intersection = 4 * 3 + 4 * 3
result = {"total": total, "divisible": divisible,
"p_divisible": str(Fraction(divisible, total)),
"p_first_one_given_divisible": str(Fraction(intersection, divisible))}
import json
print(json.dumps(result, ensure_ascii=False, sort_keys=True))