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 have been trying to solve this problem and have got the correct answer on my Ubuntu 64 bit 14.04 machine. But, when I submit the code, it fails for all but 2 of the test cases. I feel I am going wrong with the data type and format specifier. I am using unsigned long long and using %llu or or %"PRIu64" to print the output, but not getting the correct answer. However, on my machine I get all correct answers for all the values upto 1000. Can anyone please guide me for this ?
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #76: Counting summations
You are viewing a single comment's thread. Return to all comments →
I have been trying to solve this problem and have got the correct answer on my Ubuntu 64 bit 14.04 machine. But, when I submit the code, it fails for all but 2 of the test cases. I feel I am going wrong with the data type and format specifier. I am using unsigned long long and using %llu or or %"PRIu64" to print the output, but not getting the correct answer. However, on my machine I get all correct answers for all the values upto 1000. Can anyone please guide me for this ?