Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- int main() {
- int tc;
- char s[20];
- scanf("%d", &tc);
- while (tc--) {
- scanf("%s", s);
- if (strlen(s) > 3)
- printf("3\n");
- else {
- if(s[0] == 'o' && s[1] == 'n' && s[2] == 'e') printf("1\n");
- else if(s[0] == 'o' && s[1] == 'n') printf("1\n");
- else if(s[0] == 'o' && s[2] == 'e') printf("1\n");
- else if(s[1] == 'n' && s[2] == 'e') printf("1\n");
- else if(s[0] == 't' && s[1] == 'w' && s[2] == 'o') printf("2\n");
- else if(s[0] == 't' && s[1] == 'w') printf("2\n");
- else if(s[0] == 't' && s[2] == 'o') printf("2\n");
- else if(s[1] == 'w' && s[2] == 'o') printf("2\n");
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement