結果

問題 No.264 じゃんけん
ユーザー jimanojimano
提出日時 2016-01-10 16:33:57
言語 Java21
(openjdk 21)
結果
AC  
実行時間 135 ms / 5,000 ms
コード長 578 bytes
コンパイル時間 3,515 ms
コンパイル使用メモリ 77,780 KB
実行使用メモリ 57,516 KB
最終ジャッジ日時 2023-10-19 19:46:56
合計ジャッジ時間 5,442 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 132 ms
57,372 KB
testcase_01 AC 132 ms
57,088 KB
testcase_02 AC 133 ms
57,328 KB
testcase_03 AC 133 ms
57,344 KB
testcase_04 AC 132 ms
57,316 KB
testcase_05 AC 135 ms
57,300 KB
testcase_06 AC 131 ms
57,516 KB
testcase_07 AC 132 ms
57,364 KB
testcase_08 AC 132 ms
57,364 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class No0264 {
	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		byte N = sc.nextByte();
		byte K = sc.nextByte();

		if(N == K) drew();
		if(N == 0){
			if(K == 1) won();
			if(K == 2) lost();
		}
		if(N == 1){
			if(K == 2) won();
			if(K == 0) lost();
		}
		if(N == 2){
			if(K == 0) won();
			if(K == 1) lost();
		}
	}
	
	public static void won(){
		System.out.println("Won");
	}
	public static void lost(){
		System.out.println("Lost");
	}
	public static void drew(){
		System.out.println("Drew");
	}
	
}
0