Guest User

Untitled

a guest
Feb 11th, 2019
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.64 KB | None | 0 0
  1. import java.io.*;
  2. import java.util.*;
  3.  
  4. public class Main {
  5.     public static void main(String[] args) {
  6. Scanner s= new Scanner(System.in);
  7.     int lineNum=s.nextInt();
  8.     char[][] lines= new char[lineNum][];
  9.     int tCount=0;
  10.     int sCount=0;
  11.     s.nextLine();
  12.     for(int i=0; i<lineNum; i++){
  13.       lines[i]= s.nextLine().toLowerCase().toCharArray();
  14.       for(int o=0; o<lines[i].length; o++){
  15.         if(lines[i][o]=='t')
  16.           tCount++;
  17.         else if(lines[i][o]=='s')
  18.           sCount++;
  19.       }
  20.     }
  21.  
  22.     if(tCount>sCount)
  23.       System.out.println("English");
  24.     else
  25.       System.out.println("French");
  26.     }
Add Comment
Please, Sign In to add comment