int main()标签:10,return,22,自定义,int,一项,222,式子 From: https://blog.51cto.com/u_15880518/6106483
{
int p = 0;//设的数字
int i = 0;
int z = 0;
int d = 0;//自定义前几项
int r = 0;//一项
scanf("%d %d", &p,&d);
for (i = 0; i < d; i++)
{
r = r * 10 + p;//先算出一项来
z = z + r;//算总和
}
printf("Sn==%d\n", z);
return 0;
}