int fn(int a, int n){
int sum = 0, i;
for (i = 1; i <= n; i++){
sum = sum + a;
a = a * 10;
}
return sum;
}
int SumA(int a, int n){
int sum = 0;
for (int i = 1; i <= n; i++){
sum = sum + fn(a, i);
}
return sum;
}
使用函数求特殊a串数列和 (20分)
最新推荐文章于 2023-12-12 17:08:49 发布