Click Here to see the problem detail.
Solution
It is suggested you to read the problem first. Try to solved yourself then see the source code. Don’t copy paste.
Source Code
#include<stdio.h> #include<string.h> int main() { int testCase; char word[10]; scanf("%d",&testCase); while(testCase--) { int flag=0; scanf("%s",word); if(strlen(word)==5) printf("3\n"); else { if(word[0]=='o') flag++; if(word[1]=='n') flag++; if(word[2]=='e') flag++; if(flag>=2) printf("1\n"); else printf("2\n"); } } return 0; }
Next Previous