English or French?
Time limit2sMemory limit512 MB
Count the letters t and T against s and S across N lines and print English if t wins, otherwise French.
- Level
Easy2 of 10
- Topics
- String, Implementation
- Solved
- No attempts yet
Problem
You want to run some experiments in natural language processing. Natural language processing (NLP) uses machines to recognize human languages.
Your first idea is to write a program that can distinguish English text from French text.
After some analysis, you conclude that a reasonable way to tell these two languages apart is to compare how often the letters t and T appear against how often the letters s and S appear. Specifically:
- if the text has more
tandTcharacters thansandScharacters, we say it is (probably) English; - if the text has more
sandScharacters thantandTcharacters, we say it is (probably) French; - if the number of
tandTcharacters equals the number ofsandScharacters, we say it is (probably) French.
Input
The first line contains an integer (). The next lines each contain a line of text with at least one character and at most 100 characters.
Output
Print a single line containing either English (the text is probably English) or French (the text is probably French).