UVA12289:

One-Two-Three

#include <iostream>
#include <string>


using namespace std;

int main(){
	int n;
	string s;
	cin >> n;
	for(int i = 0; i < n; i++){
		cin >> s;

		if(s.length() == 5){
			cout << 3 << endl;
		} else {
			bool one = (s[0] == 'o' && s[2] == 'e') || (s[0] == 'o' && s[1] == 'n') ||
					(s[1] == 'n' && s[2] == 'e');

			cout << (one ? 1:2) << endl;

		}



	}




	return 0;


}
[Back to Listing Page]

Home

Posts

Projects

Github

Contact

janzzen

Developed by Janzzen Ang powered by Vercel