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 (≤).

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<stdio.h>
#include<string.h>
#include<stdlib.h>
int main(){
char n[];
char str[];
char *m[]={"zero","one","two","three","four","five","six","seven","eight","nine"};
int temp,sum=,i=;
scanf("%s",n);
for(i=;i<strlen(n);i++){
temp=n[i]-'';
sum+=temp;
}
sprintf(str,"%d",sum);
int b=str[strlen(str)-]-'';
for(i=;i<strlen(str)-;i++){
int a=str[i]-'';
printf("%s ",m[a]);
}
printf("%s",m[b]);
return ;
}

Spell It Right的更多相关文章

  1. Spell checker

     Spell checker Time Limit:2000MS     Memory Limit:65536KB     64bit IO Format:%I64d & %I64u Subm ...

  2. [solr] - spell check

    solr提供了一个spell check,又叫suggestions,可以用于查询输入的自动完成功能auto-complete. 参考文献: https://cwiki.apache.org/conf ...

  3. poj 1035 Spell checker

    Spell checker Time Limit: 2000 MS Memory Limit: 65536 KB 64-bit integer IO format: %I64d , %I64u   J ...

  4. Spell checker(暴力)

    Spell checker Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 20188   Accepted: 7404 De ...

  5. 1.7.7 Spell Checking -拼写检查

    1. SpellCheck SpellCheck组件设计的目的是基于其他,相似,terms来提供内联查询建议.这些建议的依据可以是solr字段中的terms,外部可以创建文本文件, 或者其实lucen ...

  6. POJ1035——Spell checker(字符串处理)

    Spell checker DescriptionYou, as a member of a development team for a new spell checking program, ar ...

  7. ZOJ-3380 Patchouli’s Spell Cards DP, 组合计数

    题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3380 题意:有m种不同的元素,每种元素都有n种不同的相位,现在假 ...

  8. VIM 拼写/spell check

    VIM 拼写检查/spell check 一.Hunspell科普 Hunspell 作为一个拼写检查的工具,已经用在了许多开源的以及商业软件中.包括Google Chrome, Libreoffic ...

  9. spell checking

    Spell checker Description You, as a member of a development team for a new spell checking program, a ...

  10. [LeetCode] Stickers to Spell Word 贴片拼单词

    We are given N different types of stickers. Each sticker has a lowercase English word on it. You wou ...

随机推荐

  1. c#的参数调用

    c#的参数传递有三种方式:值传递,和c一样,引用传递,类似与c++,但形式不一样输出参数,这种方式可以返回多个值,这种有点像c中的指针传递,但其实不太一样.值传递不细说,c中已经很详细了引用传递实例如 ...

  2. 1129. Shortest Path with Alternating Colors

    原题链接在这里:https://leetcode.com/problems/shortest-path-with-alternating-colors/ 题目: Consider a directed ...

  3. SIGAI机器学习第二十四集 聚类算法1

    讲授聚类算法的基本概念,算法的分类,层次聚类,K均值算法,EM算法,DBSCAN算法,OPTICS算法,mean shift算法,谱聚类算法,实际应用. 大纲: 聚类问题简介聚类算法的分类层次聚类算法 ...

  4. nodejs+nvm历史版本

    官网:http://nodejs.org/dist/ 淘宝镜像:https://npm.taobao.org/mirrors/node/ nvm历史版本:https://github.com/core ...

  5. 【luoguP2371】 [国家集训队]墨墨的等式

    题目链接 考虑将所有的\(a_1x_1+a_2x_2+--+a_nx_n=B\)对\(a_1\)取模,那么所有可达到的B就分为了\(0\)~\(a_1-1\)类 如果对\(a_1\)取模为\(k\)的 ...

  6. windows sh.exe 中文乱码

    idea 需要重启 export LANG=zh_CN.utf-8 alias ls='ls --show-control-chars --color=auto'

  7. P2052 [NOI2011]道路修建——树形结构(水题,大佬勿进)

    P2052 [NOI2011]道路修建 这个题其实在dfs里面就可以把事干完的,(我一开始还拿出来求了一把)…… 一条边的贡献就是儿子的大小和n-siz[v]乘上边权: #include<cma ...

  8. 【2019.11.20】SDN上机第4次作业

    安装OpenDayLight控制器 配置JAVA环境 https://www.opendaylight.org/ 在官网进行下载OpenDayLight控制器 启动OpenDayLight控制器和安装 ...

  9. 面试问我 Java 逃逸分析,瞬间被秒杀了。。

    记得几年前有一次栈长去面试,问到了这么一个问题: Java中的对象都是在堆中分配吗?说明为什么! 当时我被问得一脸蒙逼,瞬间被秒杀得体无完肤,当时我压根就不知道他在考什么知识点,难道对象不是在堆中分配 ...

  10. spring boot后端使用fastjson,错误代码415, 500

    $.post({ url: "/register", dataType: "json", contentType: "application/json ...