import java.util.Scanner;
public class homework1 { //记得修改文件名和类名
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc=new Scanner(System.in);
int x,n,sum=0,y=0,i=1;
System.out.println("请输入一个0-9的数及组数:");
x=sc.nextInt();
n=sc.nextInt();
for(i=1;i<=n;i++)
{
y=y*10+x;
System.out.print(y+" ");
sum=sum+y;
}
System.out.println();
System.out.println("和为"+sum);
}
}
//a+aa+aaa+aaaa......