Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/SuprDewd/CompetitiveProgramming
/ fac
Function
fac
code/mathematics/intx.test.cpp:18–25 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
16
}
17
18
intx fac(int n) {
19
intx res(1);
20
for (int i = 1; i <= n; i++) {
21
res = res * i;
22
}
23
24
return res;
25
}
26
27
intx gcd(intx a, intx b) {
28
return eq(b, intx(0)) ? a : gcd(b, a % b);
Callers
1
test
Function · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected