We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Looked down at the link "Environment". C++ developers have Boost in their hands. So it boils down to:
#include<boost/multiprecision/cpp_int.hpp>// Complete the extraLongFactorials function below.voidextraLongFactorials(intn){usingboost::multiprecision::cpp_int;intmultiplier=1;cpp_intfactorial=1;while(multiplier<=n)factorial*=multiplier++;cout<<factorial;}
My comment doesn't have any algorithmical value but it might direct to right direction. Don't invent the wheel when someone has done it allready.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Extra Long Factorials
You are viewing a single comment's thread. Return to all comments →
Looked down at the link "Environment". C++ developers have Boost in their hands. So it boils down to:
My comment doesn't have any algorithmical value but it might direct to right direction. Don't invent the wheel when someone has done it allready.