View Code of Problem 86

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

Double click to view unformatted code.


Back to problem 86