import java.util.Scanner;
//信1605-1 20163430 王铭宇
public class Number {
public static void main(String args[]){
Num N=new Num();
System.out.println("请输入一个整数:");
Scanner input=new Scanner(System.in);
int num=input.nextInt();
System.out.println(N.NumWeishu(num)+"位数");
}
}
class Num{
public int NumWeishu(int a){
int sum=0;
int num1;
int num2;
int weishu;
num1=a%10;
num2=a/10;
sum=sum+num1;
weishu=1;
System.out.print(num1+" ");
while(num2!=0)
{
num1=num2%10;
num2=num2/10;
sum=sum+num1;
weishu=weishu+1;
System.out.print(num1+" ");
}
System.out.println("求和"+sum);
return weishu;
}
}