https://www.acmicpc.net/problem/2490
package javaTest;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class BOJ_2490 {
public static void main(String[] args) throws IOException{
// TODO Auto-generated method stub
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st = null;
for(int i=0; i<3; i++) {
int count = 0;
st = new StringTokenizer(br.readLine());
for(int j=0; j<4; j++) {
if(st.nextToken().equals("0")) {
count = count + 1;
}
}
switch(count) {
case 0 : System.out.println("E");
break;
case 1 : System.out.println("A");
break;
case 2 : System.out.println("B");
break;
case 3 : System.out.println("C");
break;
case 4 : System.out.println("D");
break;
}
}
}
}