mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-02-03 18:46:50 +08:00
Update math/lcm_sum.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
This commit is contained in:
@@ -25,7 +25,7 @@ namespace math {
|
||||
* @param num input number
|
||||
* @returns int Sum of LCMs, i.e. ∑LCM(i, num) from i = 1 to num
|
||||
*/
|
||||
uint64_t lcmSum(uint64_t num) {
|
||||
uint64_t lcmSum(uint16_t num) {
|
||||
|
||||
uint64_t i=0, j=0;
|
||||
std::vector <uint64_t> eulerTotient(num+1);
|
||||
|
||||
Reference in New Issue
Block a user