#include "stdio.h"
#include "math.h"
void main()
{ int a,n,i;
long sum=0;
printf("Please input a(0 scanf("%d%d",&a,&n);
if(a>9||a<=0)
{
printf("a is not in (1,2,3,4,5,6,7,8,9)!\nplease input a again:");
scanf("%d",&a);
}
for(i=1;i<=n;i++)
{
sum+=(pow(10,i)-1)*a/9.0;
}
printf("sum=:%ld",sum);
}