Update math/lcm_sum.cpp

Co-authored-by: Ayaan Khan <ayaankhan98@gmail.com>
This commit is contained in:
chestamittal 2020-10-27 01:09:08 +05:30 committed by GitHub
parent 57729bf37f
commit 2d415763d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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(uint16_t num) {
uint64_t lcmSum(const uint16_t& num) {
uint64_t i=0, j=0;
std::vector <uint64_t> eulerTotient(num+1);