diff --git a/.vscode/acm.code-snippets b/.vscode/acm.code-snippets index 432e271..f87f046 100644 --- a/.vscode/acm.code-snippets +++ b/.vscode/acm.code-snippets @@ -72,7 +72,7 @@ "inline TResult mmax(CRP(T, v), const Args &... args) { return max(v, mmax(args...)); }", "inline ll gcd(ll a, ll b)", "{", - " for (; b; swap(a, b)) a = a % b;", + " for (; b; swap(a, b)) a %= b;", " return a;", "}", "inline ll fpow(ll a, ll b, ll m)", diff --git a/tmpl.cpp b/tmpl.cpp index 777489d..1e0c9dc 100644 --- a/tmpl.cpp +++ b/tmpl.cpp @@ -51,7 +51,7 @@ template > inline TResult mmax(CRP(T, v), const Args &... args) { return max(v, mmax(args...)); } inline ll gcd(ll a, ll b) { - for (; b; swap(a, b)) a = a % b; + for (; b; swap(a, b)) a %= b; return a; } inline ll fpow(ll a, ll b, ll m)