Datasets:
Download code/math_code_004_verify.py from efe-T/bilingual-math-code-verification-v1: direct link, hf CLI and curl.
- Browser
- Download file 353 Bytes
-
https://huggingface.co/datasets/efe-T/bilingual-math-code-verification-v1/resolve/main/code/math_code_004_verify.py
- Command line
-
hf download hf://datasets/efe-T/bilingual-math-code-verification-v1/code/math_code_004_verify.py
-
curl -L -o math_code_004_verify.py https://huggingface.co/datasets/efe-T/bilingual-math-code-verification-v1/resolve/main/code/math_code_004_verify.py
353 Bytes
| conditions = lambda n: n % 5 == 2 and n % 7 == 3 and n % 9 == 4 | |
| residues = [n for n in range(315) if conditions(n)] | |
| assert len(residues) == 1 | |
| above = next(n for n in range(1000, 1315) if conditions(n)) | |
| result = {"first": residues[0], "period": 315, "first_at_least_1000": above} | |
| import json | |
| print(json.dumps(result, ensure_ascii=False, sort_keys=True)) | |