#include<stdio.h>
int main() {
int a, n;
scanf_s("%d %d", &a, &n);
int sum = a;
int b = a;
for (int i = 0; i < n-1; i++) {
a = a * 10+b;
sum += a;
}
printf("%d", sum);
}
C语言经典100例(18)s=a+aa+aaa+aaaa+aa...a的值
最新推荐文章于 2024-10-11 22:29:13 发布