The task is to compute the divisor sum of a number given its prime factorisation.
Two arrays (or something equivalent) of length n, one containing the prime factor and the other containing the corresponding exponent.
The sum of all divisors (including the number itself).
The number 240 has 2, 3, and 5 as prime factors with 4, 1, and 1 as the respective exponents. The expected output would then be 744.
Input: [2,3,5] [4,1,1] Output: 744
Shortest code in bytes wins!
If your solution's run time complexity is O(sum of exponents) rather than O(product of exponents), your score may be multiplied by 0.8.
There was a similar question posted here, but it wasn't a challenge. I think the problem is interesting enought to be golfed.
The winner will be choosen this weekend