链接:http://pat.zju.edu.cn/contests/pat-a-practise/1005
题意:计算一个大数每位数字相加之和,结果输出每位数字对应的英文。
分析:结果输出利用hash的思想。
#include<stdio.h> int arr[20]; int idx = 0; char str[10][10] = { "zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine" }; int main() { char ch; int sum = 0; while (1) { scanf("%c", &ch); if (ch >= '0' && ch <= '9') { sum += ch - '0'; } else if (ch == '\n') break; else ; } if (sum == 0) { printf("zero\n"); return 0; } while (sum) { arr[idx++] = sum % 10; sum = sum / 10; } int i; for (i = idx - 1; i >= 0; i--) { printf("%s", str[arr[i]]); if (i) printf(" "); } printf("\n"); return 0; }
相关推荐
VisualStudio.SpellChecker.VS2013And2015.vsix——VisualStudio.SpellChecker.VS2013And2015.vsix——VisualStudio.SpellChecker.VS2013And2015.vsix
1005 Spell It Right (20 分)【int与string互换,hash打表】 1082 Read Number in Chinese (25 分)【将数字转成中文】 1093 Count PAT's (25 分)【PAT计数】 1071 Speech Patterns (25 分)【如何将词...
Aspose.Spell for .NET 1.9.8.0 Hot Fix (12/27/2008 11:20:42 PM)
它可以使.Net应用程序具有对20多种语言进行拼写检查的功能,其中包括的语言的有:布尔语(南非),加泰罗尼亚语(西班牙),丹麦语(丹麦),荷兰语,英语(澳大利亚),英语(新西兰),英语(美国),英语(联合王国...
TrinityCore 版本的spell.dbc详细中文解释
Just compile/install it with Delphi 7 IDE. The PlusPack with Spelling Dictionary Compiler (WinNT/Win2k Only), Thesaurus File Compiler and Custom Dictionary Import/Export Utility is also included in ...
易语言模块spell.rar 易语言模块spell.rar 易语言模块spell.rar 易语言模块spell.rar 易语言模块spell.rar 易语言模块spell.rar
npm install codemirror-spell-checker --save通过。 bower install codemirror-spell-checker --save通过 。 请注意,jsDelivr可能需要几天时间才能更新到最新版本。 < link rel =" stylesheet " href =" ...
汉字转拼音的类 C# Chinese2Spell.cs
ka_GE.spell:ლექსიკონი-格鲁吉亚语拼写检查字典
python库。 资源全名:spellchecker-0.2.linux-x86_64.tar.gz
eclipse找不到java源码eclipse.spellchecker 通常是从JDT中提取拼写检查器,以便可以在其他插件中使用。
.NET FrameWork 4.8 已经对Github上的最新版本进行调整,可以无错运行导入Spell App.Config配置数据链接及新建数据库名称 WoW-Spell-Editor-master |____Documentation BandingList对应dbc文件二进制字段列表,语言...
wow spell editor from github。 魔兽世界技能编辑器,来自git
Secor 是一个交互式拼写检查系统。 它旨在测试一种使用 Trigram 方法作为过滤器来减小字典大小的技术。 选择完成后,将使用编辑距离方法对单词列表进行排序。
可直接依赖 compile 'com.belerweb:pinyin4j:2.5.0' 转载网址:https://blog.csdn.net/wanxuedong/article/details/64213295
Spellchecking Any word processing application will typically contain a spell check feature. Not only does this feature point out potentially misspelled words it also suggests possible corrections.
拼写纠错
python库,解压后可用。 资源全名:spell-0.41.26-py2.py3-none-any.whl
SPELL.DBC各参数解释.doc