結果

問題 No.264 じゃんけん
ユーザー len_proglen_prog
提出日時 2016-06-08 11:32:08
言語 Java21
(openjdk 21)
結果
AC  
実行時間 136 ms / 5,000 ms
コード長 833 bytes
コンパイル時間 2,141 ms
コンパイル使用メモリ 74,500 KB
実行使用メモリ 54,284 KB
最終ジャッジ日時 2024-04-17 09:39:10
合計ジャッジ時間 3,979 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 133 ms
53,876 KB
testcase_01 AC 131 ms
54,192 KB
testcase_02 AC 132 ms
54,088 KB
testcase_03 AC 134 ms
54,076 KB
testcase_04 AC 134 ms
54,084 KB
testcase_05 AC 132 ms
54,284 KB
testcase_06 AC 135 ms
54,284 KB
testcase_07 AC 136 ms
53,692 KB
testcase_08 AC 136 ms
54,204 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int M,Y;
		M = scan.nextInt();
		Y = scan.nextInt();

		if(M == 0){
			switch(Y){
				case 0:
					System.out.println("Drew");
					break;
				case 1:
					System.out.println("Won");
					break;
				case 2:
					System.out.println("Lost");
					break;
			}
		}else if(M == 1){
			switch(Y){
				case 0:
					System.out.println("Lost");
					break;
				case 1:
					System.out.println("Drew");
					break;
				case 2:
					System.out.println("Won");
					break;
			}
		}else if(M == 2){
			switch(Y){
				case 0:
					System.out.println("Won");
					break;
				case 1:
					System.out.println("Lost");
					break;
				case 2:
					System.out.println("Drew");
					break;
			}
		}
		scan.close();
	}

}
0