Download 164/solution/_reference.py from PRHW/loom-benchmark-mbpp: direct link, hf CLI and curl.
- Browser
- Download file 243 Bytes
-
https://huggingface.co/datasets/PRHW/loom-benchmark-mbpp/resolve/main/164/solution/_reference.py
- Command line
-
hf download hf://datasets/PRHW/loom-benchmark-mbpp/164/solution/_reference.py
-
curl -L -o _reference.py https://huggingface.co/datasets/PRHW/loom-benchmark-mbpp/resolve/main/164/solution/_reference.py
243 Bytes
| import math | |
| def div_sum(n): | |
| total = 1 | |
| i = 2 | |
| while i * i <= n: | |
| if (n % i == 0): | |
| total = (total + i + math.floor(n / i)) | |
| i += 1 | |
| return total | |
| def are_equivalent(num1, num2): | |
| return div_sum(num1) == div_sum(num2); |