From fa92a18c2e777da1b0361415d16e0fd88ae115bd Mon Sep 17 00:00:00 2001 From: Ayaan Khan Date: Tue, 23 Jun 2020 23:28:13 +0530 Subject: [PATCH] fixed cpplint long -> int64 --- math/primes_up_to_billion.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/math/primes_up_to_billion.cpp b/math/primes_up_to_billion.cpp index af6d34ff3..f13a8312b 100644 --- a/math/primes_up_to_billion.cpp +++ b/math/primes_up_to_billion.cpp @@ -14,9 +14,9 @@ void Sieve(int64_t n) { memset(prime, '1', sizeof(prime)); // intitize '1' to every index prime[0] = '0'; // 0 is not prime prime[1] = '0'; // 1 is not prime - for (long p = 2; p * p <= n; p++) { + for (int64 p = 2; p * p <= n; p++) { if (prime[p] == '1') { - for (long i = p * p; i <= n; i += p) + for (int64 i = p * p; i <= n; i += p) prime[i] = '0'; // set all multiples of p to false } }