MCPcopy Create free account
hub / github.com/SuprDewd/CompetitiveProgramming / fib

Function fib

code/mathematics/intx.test.cpp:7–16  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5}
6
7intx fib(int n) {
8 intx a(0), b(1);
9 for (int i = 0; i < n; i++) {
10 intx c = a + b;
11 a = b;
12 b = c;
13 }
14
15 return a;
16}
17
18intx fac(int n) {
19 intx res(1);

Callers 1

testFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected