What is bigger than unsigned long long int
in C++ (Visual Studio)?
fib(93)
doesn't work, but fib(92)
works correctly:
#include <iostream>
using namespace std;
long long int fib(int n) {
unsigned long long * f = new unsigned long long int[n];
f[0] = 1;
f[1] = 1;
for (int i = 2; i < n; i++) {
f[i] = f[i - 1] + f[i - 2];
}
return f[n-1];
}
int main() {
cout << fib(93);
system("pause");
return 0;
}