Submission #1104857


Source Code Expand

import java.util.Scanner;

public class Main {
	static String[] Lb;
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
        Scanner in = new Scanner(System.in);
        String line = in.nextLine();
        String[] L = line.split(" ");

       System.out.println(isWinA(L[0], L[1]));
	}

	private static String isWinA(String A,String B){
		int a =Integer.parseInt(A);
		int b = Integer.parseInt(B);
		if(a != 1 && b != 1){
			if(Integer.parseInt(A) > Integer.parseInt(B)){
				return "Alice";
			}else if(Integer.parseInt(A) == Integer.parseInt(B)){
				return "Draw";
			}else{
				return "Bob";
			}
		}else{
			if( a == 1 && b == 1){
				return "Draw";
			}else{
				if(a == 1){
					return "Alice";
				}
				if(b == 1){
					return "Bob";
				}
			}
			return "";
		}
	}
}

Submission Info

Submission Time
Task A - One Card Poker
User parinpon123
Language Java8 (OpenJDK 1.8.0)
Score 100
Code Size 865 Byte
Status AC
Exec Time 95 ms
Memory 23124 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 3
AC × 10
Set Name Test Cases
Sample sample_01.txt, sample_02.txt, sample_03.txt
All sample_01.txt, sample_02.txt, sample_03.txt, subtask_1_01.txt, subtask_1_02.txt, subtask_1_03.txt, subtask_1_04.txt, subtask_1_05.txt, subtask_1_06.txt, subtask_1_07.txt
Case Name Status Exec Time Memory
sample_01.txt AC 91 ms 23124 KB
sample_02.txt AC 92 ms 19284 KB
sample_03.txt AC 89 ms 21844 KB
subtask_1_01.txt AC 95 ms 20820 KB
subtask_1_02.txt AC 90 ms 19796 KB
subtask_1_03.txt AC 91 ms 16852 KB
subtask_1_04.txt AC 88 ms 19796 KB
subtask_1_05.txt AC 91 ms 21716 KB
subtask_1_06.txt AC 91 ms 19668 KB
subtask_1_07.txt AC 87 ms 18644 KB