View Code of Problem 86

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





	return 0;
}

Double click to view unformatted code.


Back to problem 86