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

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

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 (<= 10^100^).

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
#include
#include
const int MAX=110;int main(){ char str[MAX]; char strsum[10]; char num[10][10]={"zero","one","two","three","four","five" ,"six","seven","eight","nine"}; int sum=0; scanf("%s",str); int len=strlen(str); for(int i=0;i

 

转载于:https://www.cnblogs.com/cobread/p/10846234.html

你可能感兴趣的文章
《2016ThoughtWorks技术雷达峰会----雷达新趋势》
查看>>
正则【备用】
查看>>
FeatureSelectors
查看>>
数据库防火墙DBShield安装
查看>>
sudo with no password
查看>>
Windows 局域网ping获取设备IP
查看>>
使用蓝图来扩展编辑器
查看>>
USACO题目——Transformations
查看>>
除了 UCAN 发布的鹿班和普惠体,这些设计工具也来自阿里
查看>>
转载----Python正则表达式指南
查看>>
.Net使用system.Security.Cryptography.RNGCryptoServiceProvider类与System.Random类生成随机数
查看>>
HDU 1394 Minimum Inversion Number 线段树
查看>>
Java 集合系列04之 fail-fast总结(通过ArrayList来说明fail-fast的原理、解决办法)
查看>>
ssm框架整合
查看>>
C/C++里自带提供的整数进制转换的几种方式(转载)
查看>>
JAVA类加载顺序
查看>>
数据结构复习
查看>>
JSONPlaceholder - 免费的在线REST服务(提供测试用的HTTP请求假数据)
查看>>
今天购买了一个云服务器
查看>>
C#以管理员身份运行程序
查看>>