bilingual-math-code-verification-v1 / code /math_code_004_verify.py
efe-T's picture
Upload folder using huggingface_hub
93237a0 verified
Raw History Blame Contribute Delete
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))