一二三
来源:互联网 发布:mac版练字打字软件 编辑:程序博客网 时间:2024/03/29 04:11
1100: 一二三
Time Limit: 1 Sec Memory Limit: 128 MB
Submit: 1225 Solved: 546
[Submit][Status][Web Board]
Description
你弟弟刚刚学会写英语的一(one)、二(two)和三(three)。他在纸上写了好些一二三,可惜有些字母写错了。已知每个单词最多有一个字母写错了(单词长度肯定不会错),你能认出他写的啥吗?
Input
第一行为单词的个数(不超过10)。以下每行为一个单词,单词长度正确,且最多有一个字母写错。所有字母都是小写的。
Output
对于每组测试数据,输出一行,即该单词的阿拉伯数字。输入保证只有一种理解方式。
Sample Input
3
owe
too
theee
Sample Output
1
2
3
#include <iostream>#include <cstring>#include <cstdio>using namespace std;int main(){ int n; char s[1000]; scanf("%d",&n); while(n--) { scanf("%s",s); int len=strlen(s); if(len==3) { if((s[0]=='o'&&s[1]=='n')||(s[0]=='o'&&s[2]=='e')||(s[1]=='n'&&s[2]=='e')) cout<<1; else cout<<2; } else cout<<3; cout<<endl; } return 0;}
0 0
- (一二三)
- 一二三
- 一二三
- 一二三
- 一二三
- 一二三
- 一二三
- 一二三
- 一二三
- debug经验一二三
- Static 一二三
- debug经验一二三
- Enough用法一二三
- 数据库邮件一二三
- Analysis Services一二三
- 全文索引一二三
- 南邮一二三
- 老子一二三
- **1.dwr配置和第一次输出**
- 把ArrayList转化为Json格式,在用url编码
- Fragment的进一步使用(三)--- 关于DialogFragment对话框,设备旋转与fragment,fragment间的通讯 , fragment的Menu
- CocoaPods的安装和使用说明
- 百度地图多个描点
- 一二三
- 关于在Spring4 jdbctemplate 遇到的一些基本问题总结
- Centos7 源码安装 Apache
- android 底部弹出菜单(带透明背景)
- 迷宫的最短路径
- JS调用Envi Services Engine发布的影像处理服务
- 华为OJ 初级 挑7
- Java OCR 图像智能字符识别技术[可识别中文]
- 软件定义存储(SDS)学习一