Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/atcoder/ac-library
/ gcd
Function
gcd
test/unittest/math_test.cpp:12–16 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
10
using ull = unsigned long long;
11
12
ll gcd(ll a, ll b) {
13
assert(0 <= a && 0 <= b);
14
if (b == 0) return a;
15
return gcd(b, a % b);
16
}
17
18
ll pow_mod_naive(ll x, ull n, uint mod) {
19
ull y = (x % mod + mod) % mod;
Callers
1
TEST
Function · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected