View Code of Problem 86

#include<bits/stdc++.h>
using namespace std;
int main()
{
	int a,n,i,sum=0;
	cin>>a>>n;
	int t=a;
	for(i=1;i<=n;i++)
	{
		sum+=a;
		a=a*10+t;
	}
	cout<<sum<<endl;
	return 0;
}

Double click to view unformatted code.


Back to problem 86