View Code of Problem 86

#include<stdio.h>
int main()
{
	int a,n,t,sum=0;
	scanf("%d %d",&a,&n);
	t=a;
	while(n>0)
	{
		sum=sum+a;
		a=10*a+t;
		n--;
	}
	printf("%d",sum);
}

Double click to view unformatted code.


Back to problem 86