From 806f3251ee483a4f31b4ec4dd7e1f645a79630e9 Mon Sep 17 00:00:00 2001 From: Neha Hasija Date: Tue, 27 Oct 2020 06:33:29 +0530 Subject: [PATCH] Update math/magic_number.cpp Co-authored-by: David Leal --- math/magic_number.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/math/magic_number.cpp b/math/magic_number.cpp index 047278500..51232601b 100644 --- a/math/magic_number.cpp +++ b/math/magic_number.cpp @@ -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;