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