View Code of Problem 86

#include<stdio.h>
#include<cstdlib>
#include<cmath>
#include<iostream>
#include<algorithm>
using namespace std;
typedef long long ll;
int main(){
	int  a,n;
	scanf("%d%d", &a,&n);
	int sum=a,b=a;
     for(int i=1;i<n;i++){
     	 a=a*10+b;
      sum=sum+a;
	 }
	printf("%d\n",sum);
	return 0;
}

Double click to view unformatted code.


Back to problem 86