import java.util.Scanner;
public class text4{
public static void main(String[]args){
int x; //x個數相加;
System.out.println("請輸入加數項的個數:");
Scanner in = new Scanner(System.in);
x = in.nextInt();
int a; //每位的值a;
System.out.println("請輸入加數每位的值:");
a = in.nextInt();
int c[] = new int[x]; //第i個加數的值;
int b[] = new int[x]; //第i位的值;
int i,j;
int s = 0;
for(i = 0;i < x;i++){
int tempb = 0;
tempb = (int)Math.pow(10, i);
b[i] = a * tempb;
for(j = 0;j < x;j++){
c[j] += b[i];
}
if(i==(x-1)){
System.out.print(c[i]+"=");
}else{
System.out.print(c[i]+"+");
}
s += c[i];
}
System.out.print(s);
}
} //版權所有
*