https://www.hackerrank.com/challenges/fibonaccimodified/problem i found this question on hackerrank. can anyone explain how this can be solved using c++ . asked 26 Oct '18, 05:44

@sumesh  The basics of the solution is a simple loop. This is pseudocode...
The challenge isn't the base algorithm outlined above. The challenge is the datatype to use for t_N. Since n can be up to 20 and the next term includes the square of the prior term, the max possible value of t_N is much larger than ULLONG_MAX (largest possible unsigned long long int), as the HackerRank problem statement says. There is no native data type in C++ that can handle such large integers, so it's possible this problem wants you to create your own datatype. answered 27 Oct '18, 23:11
