# include <stdio.h>
void main(){
long fun1(int n);
double fun2(int n);
int a;double sum;
printf("please input a:");
scanf("%d",&a);
sum=fun2(a);
printf("a+aa+aaa+aaaa+....=%lf",sum);
}
long fun1(int n)
{ int i;long s=1;
for(i=1;i<n;i++)
s*=10;
return s;
}
double fun2(int n )
{ int i;double sum=0,s=0;
for(i=1;i<=n;i++)
{ s+=n*fun1(i);
sum+=s;
}
return sum;
}
void main(){
long fun1(int n);
double fun2(int n);
int a;double sum;
printf("please input a:");
scanf("%d",&a);
sum=fun2(a);
printf("a+aa+aaa+aaaa+....=%lf",sum);
}
long fun1(int n)
{ int i;long s=1;
for(i=1;i<n;i++)
s*=10;
return s;
}
double fun2(int n )
{ int i;double sum=0,s=0;
for(i=1;i<=n;i++)
{ s+=n*fun1(i);
sum+=s;
}
return sum;
}