一二三
时间限制:1000 ms | 内存限制:65535 KB 难度:1- 描述
-
你弟弟刚刚学会写英语的一(one)、二(two)和三(three)。他在纸上写了好些一二三,可惜有些字母写错了。已知每个单词最多有一个字母写错了(单词长度肯定不会错),你能认出他写的啥吗?
- 输入
- 第一行为单词的个数(不超过 10)。以下每行为一个单词,单词长度正确,且最多有一个字母写错。所有字母都是小写的。
- 输出
- 对于每组测试数据,输出一行,即该单词的阿拉伯数字。输入保证只有一种理解方式。
- 样例输入
-
3 owe too theee
- 样例输出
-
1 2 3
-
AC码:
-
#include#include int main() { int T,len; char str[7]; scanf("%d",&T); while(T--) { scanf("%s",str); len=strlen(str); if(len>3) printf("3\n"); else { if((str[0]=='o'&&str[1]=='n')||(str[0]=='o'&&str[2]=='e')||(str[1]=='n'&&str[2]=='e')) printf("1\n"); else printf("2\n"); } } return 0; }
- <script type="text/java script">BAIDU_CLB_fillSlot("771048");
- 点击复制链接 与好友分享! 回本站首页 <script> function copyToClipBoard(){ var clipBoardContent=document.title + '\r\n' + document.location; clipBoardContent+='\r\n'; window.clipboardData.setData("Text",clipBoardContent); alert("恭喜您!复制成功"); }
<script type="text/java script" id="bdshare_js" data="type=tools&uid=12732"> <script type="text/java script" id="bdshell_js"> <script type="text/java script"> var bds_config = {'snsKey':{'tsina':'2386826374','tqq':'5e544a8fdea646c5a5f3967871346eb8'}}; document.getElementById("bdshell_js").src = "http://bdimg.share.baidu.com/static/js/shell_v2.js cdnversion=" + Math.ceil(new Date()/3600000) - 您对本文章有什么意见或着疑问吗?请到 论坛讨论您的关注和建议是我们前行的参考和动力
- 相关文章
- <script type="text/java script">BAIDU_CLB_fillSlot("182716");
- <script type="text/java script">BAIDU_CLB_fillSlot("517916");
- 图文推荐
<iframe src="http://www.2cto.com/uapi.php tid=296318&catid=339&title=TllPSiA1NTgg0ru2/sj9&forward=http://www.2cto.com/kf/201404/296318.html" width="100%" height="100%" id="comment_iframe" name="comment_iframe" frameborder="0" scrolling="no">
- <script type="text/java script">BAIDU_CLB_fillSlot("771057");



