-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path1332.cpp
More file actions
27 lines (21 loc) · 710 Bytes
/
1332.cpp
File metadata and controls
27 lines (21 loc) · 710 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include <iostream>
using namespace std;
int main() {
int testes;
string num;
cin >> testes;
for(int i=0; i<testes; i++) {
cin >> num;
if(num.size() == 5) {
cout << "3" << endl;
} else {
if(num[0] == 'o' && num[1] == 'n') cout << "1" << endl;
else if(num[1] == 'n' && num[2] == 'e') cout << "1" << endl;
else if(num[0] == 'o' && num[2] == 'e') cout << "1" << endl;
else if(num[0] == 't' && num[1] == 'w') cout << "2" << endl;
else if(num[1] == 'w' && num[2] == 'o') cout << "2" << endl;
else if(num[0] == 't' && num[2] == 'o') cout << "2" << endl;
}
}
return 0;
}