panks / BigInteger

An Implementation of BigInteger library in C++

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Operator % is invalid, raise std::bad_alloc Exception

Raibows opened this issue · comments

Environment: VS2019
My code:
BigInteger p = BigInteger(pp);
vector fibo(t + 10);
fibo[1] = 1;
fibo[2] = 1;
for (LL i = 3; i <= t + 2; ++i)
{
fibo[i] = fibo[i - 1] + fibo[i - 2];
}
cout << (fibo[n+2] - 1).getNumber();
p = ((fibo[n + 2] - 1) % p);