1005 Spell It Right (20 分)【难度: 简单 / 知识点: 模拟】
2023-09-11 14:15:52 时间
https://pintia.cn/problem-sets/994805342720868352/problems/994805519074574336
#include<bits/stdc++.h>
using namespace std;
int sum;
string a[15]={"zero","one","two","three","four","five","six","seven","eight","nine"};
int main(void)
{
string s; cin>>s;
for(int i=0;i<s.size();i++) sum+=s[i]-'0';
s=to_string(sum);
for(int i=0;i<s.size();i++)
{
if(i) cout<<" ";
cout<<a[s[i]-'0'];
}
return 0;
}
相关文章
- TCL 拥抱云原生,实现 IT 成本治理优化
- 20年IT老兵分享:账务系统设计及应用
- Google 和 Facebook 如何大规模处理 IT 事件管理 —— 2016 SRE 大会之我见
- CRM_ORGMAN_MERGE_MDATA_OW - how is it called
- atiitt it学科体系化 体系树与知识点概念大总结.xlsx
- [OHOS ERROR] clang not found, install it please
- 已解决FutureWarning: Conversion of the second argumecated. In future, it will be treated as `np.float64
- 一线城市高薪IT人和老家公务员,你觉得选哪个会更「香」?
- POJ1308 Is It A Tree?
- 警惕|这类人千万不要转行学IT