You are viewing a single comment's thread. Return to all comments →
The problem isn't meant to be solved using long integer. Use integer datatype to solve it. You may divide the bits and then add them seperately.
well i think you are forgetting about kiss
It is a problem that can be solved however you want. But if you look at the hint "When we add several integer values, the resulting sum might exceed the above range. You might need to use long long int in C/C++ or long data type in Java to store such sums. " It would contradict what you said.