首页 > 代码库 > 题目558-一二三-nyoj20140812

题目558-一二三-nyoj20140812

#include <stdio.h>
#include <string.h>
int main()
{
    int n,l;
    char a[10];
    scanf("%d",&n);
    getchar();
    while(n--)
    {
        gets(a);
        l=strlen(a);
        if(l==5)
        printf("3\n");
        else if(l==3)
        {
            if((a[0]==‘o‘&&a[1]==‘n‘)||(a[0]==‘o‘&&a[2]==‘e‘)||(a[1]==‘n‘&&a[2]==‘e‘))
            printf("1\n");
            else
            //if((a[0]==‘t‘&&a[1]==‘w‘)||(a[0]==‘t‘&&a[2]==‘o‘)||(a[1]==‘w‘&&a[1]==‘o‘))
            printf("2\n");
            }
        }
        return 0;
    }