C++ Practice Problem – Calculate s = a + aa + aaa + aaaa + … + a
Time Limit: 2s Memory Limit: 192MB Problem Description Calculate s = a + aa + aaa + aaaa + … + a, where a is a single-digit integer. For example, 2 + 22 + 222 + 2222 + 22222 (in this case, there are 5 numbers being added) Input Format Integer a and n (n … Read more