View Code of Problem 86

#include <iostream>
using namespace std;
int main(){
	int m,n;
	cin>>m>>n;
	int sum=0,temp=m;
	for(int i=0;i<n;i++){
		sum+=m;
		m=m*10+temp;
		
	} 
	cout<<sum;
}

Double click to view unformatted code.


Back to problem 86