#Japt, 8+2=10 8 6 bytes
Japt, 8+2=10 8 6 bytes
òâ1 xo
- 1 byte saved thanks to ETHproductions.
##Explanation :Implicit input of integer U. ò :Generate an array of integers from 1 to U, inclusive â :Get the divisors of each number, 1 : excluding itself. x :Sum the main array o :by popping the last element from each sub-array. :Implicit output of result
Explanation
:Implicit input of integer U.
ò :Generate an array of integers from 1 to U, inclusive
â :Get the divisors of each number,
1 : excluding itself.
x :Sum the main array
o :by popping the last element from each sub-array.
:Implicit output of result