#include <stdio.h>
int main()
{
int a = 0;
int n = 0;
scanf("%d%d", &a, &n); //n表示加多少项
int sum = 0;
int i = 0;
int ret = 0;
for (i = 0; i < n; i++)
{
ret = ret * 10 + a; //每一次将它乘10再加上个位的a即可
sum += ret;
}
printf("%d\n", sum);
return 0;
}
09-27
1526
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
05-18
2万+
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)