C++ 代码
#include<bits/stdc++.h>
using namespace std;
int main(){
string s;
cin>>s;
int sum = 0;
for(auto item : s) sum+=item-'1'+1;
string ss[10]={"zero","one","two","three","four","five","six","seven","eight","nine"};
int a[30],num=0;
int flag = 1;
while(sum!=0){
a[num++] = sum%10;
sum/=10;
flag = 0;
}
if(flag == 0){
for(int i=num-1;i>=0;i--){
cout<<ss[a[i]]<<" ";
}}
else if(flag == 1) cout<<"zero";
return 0;
}