#include <stdio.h> #include <math.h> int gn(int a,int n){ int sum=1; for (int i=0;i<n;i++){ sum*=a; } return sum; } int main(){ long a,n; if (scanf("%ld %ld",&a,&n)!=EOF){ long s = a; long inter = a; for (int i=1;i<n;i++){ inter = inter+gn(10,i)*a; //printf("%d %d\n",i,inter); s+=inter; } printf("s = %ld",s); }else{ printf("input wrong"); } return 0; }