View Code of Problem 86

#include<stdio.h>
//#include<math.h>
//#include<string.h>
int main() {
	int a,n,t,sum=0;
	int i;
	scanf("%d %d",&a,&n);
	t=a;
	for(i=0;i<n;i++)
	{
		sum+=a;
		a=a*10+t;
	}
   printf("%d\n",sum);
	return 0;
}

Double click to view unformatted code.


Back to problem 86