#include<bits/stdc++.h>
using namespace std;
int main(){
int total = 0;
string n;
cin>>n;
while(n.length()){
total+=(int)n[0]-'0';
n.erase(n.begin());
}
string str =to_string(total);
map<char,string> mp;
mp['0'] = "zero";
mp['1'] = "one";
mp['2'] = "two";
mp['3'] = "three";
mp['4'] = "four";
mp['5'] = "five";
mp['6'] = "six";
mp['7'] = "seven";
mp['8'] = "eight";
mp['9'] = "nine";
printf("%s",mp[str[0]].c_str());
str.erase(str.begin());
while(str.length()){
printf(" %s",mp[str[0]].c_str());
str.erase(str.begin());
}
}
1005 Spell It Right (20 分)
最新推荐文章于 2024-06-19 15:56:33 发布