Datasets:
Download code/math_code_015_solution.py from efe-T/bilingual-math-code-verification-v1: direct link, hf CLI and curl.
- Browser
- Download file 431 Bytes
-
https://huggingface.co/datasets/efe-T/bilingual-math-code-verification-v1/resolve/main/code/math_code_015_solution.py
- Command line
-
hf download hf://datasets/efe-T/bilingual-math-code-verification-v1/code/math_code_015_solution.py
-
curl -L -o math_code_015_solution.py https://huggingface.co/datasets/efe-T/bilingual-math-code-verification-v1/resolve/main/code/math_code_015_solution.py
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)) | |