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.
I think there is another way , to avoid the static_cast(0) , and do it by simply accumulate(....,0L);
If I remember correct (I am too lazy to search in books or google now to verify!) the L forces the number to be interpreted as long long.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
A Very Big Sum
You are viewing a single comment's thread. Return to all comments →
I think there is another way , to avoid the static_cast(0) , and do it by simply accumulate(....,0L); If I remember correct (I am too lazy to search in books or google now to verify!) the L forces the number to be interpreted as long long.