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.
Can you kindly explain why it is needed to use long instead of int? My code justr works fine after I used long. But I'm wondering why hasn't int datatype helped me? N<=10^4. If the value of N is 10000, int can store ir. Right?
Project Euler #6: Sum square difference
You are viewing a single comment's thread. Return to all comments →
Can you kindly explain why it is needed to use long instead of int? My code justr works fine after I used long. But I'm wondering why hasn't int datatype helped me? N<=10^4. If the value of N is 10000, int can store ir. Right?