Skip to content

Instantly share code, notes, and snippets.

@cocodahlia
Created June 14, 2015 07:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cocodahlia/1348183e3213d4d81f5a to your computer and use it in GitHub Desktop.
Save cocodahlia/1348183e3213d4d81f5a to your computer and use it in GitHub Desktop.
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = Integer.valueOf(sc.nextLine());
int R = 0;
int B = 0;
for(int i = 1;i <= n ; i++){
String tmp = sc.nextLine();
char[] floor= tmp.toCharArray();
for(char chr : floor){
if(chr == 'R'){
R++;
}else if(chr == 'B'){
B++;
}
}
}
if(R > B){
System.out.println("TAKAHASHI");
}else if(R < B){
System.out.println("AOKI");
}else if(R == B){
System.out.println("DRAW");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment