模拟就完事了
import java.util.*;
class Main{
public static void main(String[] args) {
Scanner in =new Scanner(System.in);
String s=in.next();
int sum=0;
for(int i=0;i<s.length();i) {
sum+=Integer.parseInt(s.charAt(i)+”“);
}
String t[]= {“one”,”two”,”three”,”four”,”five”,”six”,”seven”,”eight”
,”nine”,”zero”};
s=sum+”“;
for(int i=0;i<s.length();i) {
if(Integer.parseInt(s.charAt(i)+”“)==0) {
System.out.print(“zero”+” “);
continue;
}
System.out.print(t[Integer.parseInt(s.charAt(i)+”“)-1]+” “);
}
}
}