結果

問題 No.264 じゃんけん
ユーザー marumaru
提出日時 2017-09-24 08:57:40
言語 Java21
(openjdk 21)
結果
AC  
実行時間 124 ms / 5,000 ms
コード長 394 bytes
コンパイル時間 3,476 ms
コンパイル使用メモリ 74,604 KB
実行使用メモリ 41,268 KB
最終ジャッジ日時 2024-04-26 17:21:59
合計ジャッジ時間 5,131 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 124 ms
41,200 KB
testcase_01 AC 124 ms
41,212 KB
testcase_02 AC 115 ms
40,884 KB
testcase_03 AC 124 ms
41,152 KB
testcase_04 AC 119 ms
40,512 KB
testcase_05 AC 115 ms
40,436 KB
testcase_06 AC 113 ms
40,268 KB
testcase_07 AC 112 ms
40,396 KB
testcase_08 AC 124 ms
41,268 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Janken {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int me = scan.nextInt();
		int you = scan.nextInt();

		if(me == you) {
			System.out.println("Drew");
		}else if((me == 0 && you ==1) || (me==1 && you==2) || (me==2 && you==0)) {
			System.out.println("Won");
		}else {
			System.out.println("Lost");
		}
	}
}
0