MathDB
sum of digits alternate's sum May Olympiad (Olimpiada de Mayo) 2012 L1 P2

Source:

September 30, 2021
number theorysum of digits

Problem Statement

We call S (n)(n) the sum of the digits of the integer nn. For example, S(327)=3+2+7=12S (327)=3+2+7=12. Find the value of A=S(1)S(2)+S(3)S(4)+...+S(2011)S(2012).A=S(1)-S(2)+S(3)-S(4)+...+S(2011)-S(2012). (AA has 20122012 terms).