Faster version of sumto100 updated

It decreases O(n^3) to O(n^2)