結果

問題 No.264 じゃんけん
ユーザー 練習生
提出日時 2015-08-10 14:36:49
言語 Java
(openjdk 23)
結果
AC  
実行時間 123 ms / 5,000 ms
コード長 427 bytes
コンパイル時間 3,431 ms
コンパイル使用メモリ 74,484 KB
実行使用メモリ 54,804 KB
最終ジャッジ日時 2024-07-18 06:30:05
合計ジャッジ時間 4,386 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class No264 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();
		sc.close();
		String result = null;
		if(n == k){
			result = "Drew";
		}else{
			int sa = Math.abs(n - k);
			if(sa == 1 && n < k || sa == 2 && n > k){
				result = "Won";
			}else{
				result = "Lost";
			}
		}
		System.out.println(result);

	}
}
0