博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Spell It Right
阅读量:7061 次
发布时间:2019-06-28

本文共 1307 字,大约阅读时间需要 4 分钟。

Given a non-negative integer N, your task is to compute the sum of all the digits of N, and output every digit of the sum in English.

Input Specification:

Each input file contains one test case. Each case occupies one line which contains an N (<= 10100).

Output Specification:

For each test case, output in one line the digits of the sum in English words. There must be one space between two consecutive words, but no extra space at the end of a line.

Sample Input:
12345
Sample Output:
one five
1 /*  2  * File:   main.cpp 3  * Author: zjushuiping 4  * 5  * Created on 2012年4月11日, 上午12:13 6  */ 7  8 #include 
9 #include
10 #include
11 #include
12 #include
13 #include
14 #include
15 #include
16 #include
17 #include
18 #include
19 #include
20 #include
21 #include
22 #include
23 24 25 using namespace std;26 27 28 29 30 31 32 /*33 * 34 */35 36 37 char str[100+4];38 39 40 41 char mp[10][15]={ "zero","one","two","three","four","five","six","seven","eight","nine"};42 43 44 45 int main(int argc, char** argv) {46 47 48 49 gets(str);50 int i;51 int len=strlen(str);52 53 int sum=0;54 55 56 for(i=0;i

 

转载于:https://www.cnblogs.com/zjushuiping/archive/2012/05/30/2526963.html

你可能感兴趣的文章
分表处理设计思想和实现[转载]
查看>>
linux 系统负载高 如何检查
查看>>
【Unity Shader】二、顶点函数(vertex)和片元函数(fragment)传递数据,及各阶段可使用的语义(semantic)...
查看>>
十天精通CSS3(11)
查看>>
php 依赖注入容器
查看>>
算法笔记_130:行列递增矩阵的查找(Java)
查看>>
HDU 1418 抱歉 (欧拉公式)
查看>>
C#上位机串口控制12864显示
查看>>
自动化测试
查看>>
postgresSQL 实现数据修改后,自动更新updated_date/ts等字段
查看>>
老黄历接口(免注册)
查看>>
移动端开发适配总结
查看>>
CSS3阴影 box-shadow的使用和技巧总结
查看>>
RAC下修改SGA的实战操作
查看>>
JQuery/AjaX/Javascript/DIV+CSS资源下载地址
查看>>
linux下使用lftp的小结
查看>>
jqGrid的若干种用法
查看>>
jQuery实现文本框回车键转tab键 分类: JavaScript ...
查看>>
内存程序文件、内存对齐程序
查看>>
wp7设置浏览器主页
查看>>