From 1d6492bf333dcd18a0e11805810a6da2b8e57f24 Mon Sep 17 00:00:00 2001 From: Mann Mehta <44433995+mann2108@users.noreply.github.com> Date: Sun, 29 Mar 2020 17:39:39 +0530 Subject: [PATCH] resolve compilation error --- math/eulers_totient_function.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/math/eulers_totient_function.cpp b/math/eulers_totient_function.cpp index f05c7dab4..8165f030e 100644 --- a/math/eulers_totient_function.cpp +++ b/math/eulers_totient_function.cpp @@ -24,7 +24,7 @@ Hence Implementation in O(sqrt(n)). /// Function to caculate euler totient function int phiFunction(int n) { int result = n; - for (ll i=2; i*i <= n; i++) { + for (int i=2; i*i <= n; i++) { if (n%i == 0) { while (n%i == 0) { n /= i; @@ -39,5 +39,5 @@ int phiFunction(int n) { int main() { int n; std::cin >> n; - std::cout << phiFunction(n) << endl; + std::cout << phiFunction(n); }