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.
- Prepare
- Algorithms
- Warmup
- A Very Big Sum
- Discussions
A Very Big Sum
A Very Big Sum
Sort by
recency
|
2015 Discussions
|
Please Login in order to post a comment
Java Short Solution
public static long aVeryBigSum(List ar) { // Write your code here long sum=0; for(long i:(ar)) sum+=i; return sum; }
I have spent so much time to transform between str and int and do the manual computation digit by digit to ensure the storage. And then it turns out we don't need to consider the storage at all? JUST SUM???
For Python3 Platform
I wrote the code from scratch just to get more practice
Only the return satement is needed to complete the code in Pypy3