PAT1005. Spell It Right
来源:互联网 发布:怎样才能做淘宝客推广 编辑:程序博客网 时间:2024/05/16 18:13
#include<string>#include<vector>#include<iostream>using namespace std;char *p[10]={"zero","one","two","three","four","five","six","seven","eight","nine"};int main(){ int total(0); for(char c;cin>>c;)total+=c-'0'; if(total){ vector<int>ret; while(total){ret.push_back(total%10);total/=10;} for(auto it=ret.rbegin();it!=ret.rend();++it){ if(it!=ret.rbegin())cout<<' '; cout<<p[*it];} }//if else cout<<"zero"; return 0;}
0 0
- PAT1005.Spell It Right
- PAT1005. Spell It Right
- pat1005 Spell It Right
- PAT1005-Spell It Right
- PAT1005. Spell It Right (20)
- PAT1005. Spell It Right (20)
- PAT1005. Spell It Right (20)
- PAT1005. Spell It Right (20)
- PAT1005. Spell It Right (20)
- PAT1005 Spell It Right 大水题
- 1005. Spell It Right
- 1005. Spell It Right
- PAT_1005: Spell It Right
- 1005. Spell It Right
- 1005.Spell It Right
- 1005. Spell It Right
- Spell It Right
- Spell It Right
- 学生通讯录 课程设计
- Deep clone object by serialization
- 职工综合信息管理系统
- 【Java编码准则】の #11不要使用Object.equals()来比较密钥值
- binary addition
- PAT1005. Spell It Right
- struts2 配备精要之defaultStack与paramsPrepareParamsStack
- 《UNIX环境高级编程》下的开发环境
- LINQ语句结合Lambda表达式使用
- Reverse Integer--反转整数
- cJSON学习笔记 续集
- 先写想法--基于安卓的所有软件特定功能的快捷键引用
- POJ 3140 Contestants Division(简单的树形dp)
- 哈希表对字符串的高效处理4:删除字符串中重复出现的字符