counting sum of digits from a to b(sum of digts on spoj)