浙大 PAT a1005
来源:互联网 发布:手机降温软件哪个好 编辑:程序博客网 时间:2024/05/29 03:22
#include<iostream>#include<string.h>#include<string>#include<stack>using namespace std;#define max 102char input[max];char* b[10]={"zero","one","two","three","four","five","six","seven","eight","nine"};int main(){cin>>input;int len=strlen(input);int sum=0,i,temp;stack<string> result;for(i=0;i<len;i++){sum+=input[i]-'0';}do{temp=sum%10;result.push(b[temp]);sum/=10;}while(sum!=0);cout<<result.top();result.pop();while(!result.empty()){cout<<" "<<result.top();result.pop();}cout<<endl;return 0;}
0 0
- 浙大 PAT a1005
- PAT A1005
- PAT-A1005
- pat a1005(暂缺)
- PAT a1005题解
- PAT A1005 Spell It Right
- PAT A1005. Spell It Right
- 【PAT】 A1005. Spell It Right (20)
- PAT---A1005. Spell It Right (20)
- PAT A1005. Spell It Right (20)
- PAT:A1005. Spell It Right (20/20)
- PAT A1005 Spell It Right(20)
- 浙大pat 1017
- 浙大pat Advance 1003
- 浙大PAT目录
- 浙大PAT 1049
- 浙大PAT 1051
- 浙大PAT 1058
- UnityGUI系统之容器、下拉列表与自动布局
- 浙大 PAT a1002
- 基础算法之选择排序
- streaming常见计算任务失败原因
- 集合之 Collection-List->ArrayList三种遍历方式 常用方法
- 浙大 PAT a1005
- Python.PyCrypto -- 密码学工具箱
- 浙大 PAT a1008
- 浙大 PAT a1011
- Ubuntu系统下MySQL开启远程连接
- 第二十五期 总结《路由器就是开发板》
- 浙大 PAT a1027
- 数据结构之线性结构--双向循环链表
- 浙大 PAT a1058