mirror of
https://hub.njuu.cf/TheAlgorithms/C-Plus-Plus.git
synced 2023-10-11 13:05:55 +08:00
Update math/magic_number.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
This commit is contained in:
parent
69cacbc88b
commit
806f3251ee
@ -34,7 +34,7 @@ bool magic_number(const uint64_t &n) {
|
||||
return false;
|
||||
}
|
||||
// result stores the modulus of @param n with 9
|
||||
int result = n % 9;
|
||||
uint64_t result = n % 9;
|
||||
// if result is 1 then the number is a magic number else not
|
||||
if (result == 1) {
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user