Reverse is not needed
This commit is contained in:
parent
6297a364af
commit
32a5e5c01e
@ -11,7 +11,8 @@ https://projecteuler.net/problem=30
|
|||||||
using BenchmarkTools
|
using BenchmarkTools
|
||||||
|
|
||||||
function power_digit_sum(pow, n)
|
function power_digit_sum(pow, n)
|
||||||
return sum(c^pow for c in reverse(digits(n)))
|
# return sum(c^pow for c in reverse(digits(n)))
|
||||||
|
return sum(c->c^pow, digits(n))
|
||||||
end
|
end
|
||||||
|
|
||||||
function Problem30()
|
function Problem30()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user