結果

問題 No.264 じゃんけん
ユーザー yugi0922
提出日時 2020-06-21 21:11:06
言語 Java
(openjdk 23)
結果
AC  
実行時間 110 ms / 5,000 ms
コード長 678 bytes
コンパイル時間 4,272 ms
コンパイル使用メモリ 75,096 KB
実行使用メモリ 41,404 KB
最終ジャッジ日時 2024-07-03 18:23:45
合計ジャッジ時間 5,135 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

import static java.lang.System.*;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;

public class JanKen_02 {
	public static void main(String[] args) throws IOException {
        Scanner sc = new Scanner(System.in);
		BufferedReader reader = new BufferedReader(new InputStreamReader(in));
		String[] inputs = reader.readLine().split(" ");
		System.out.println(janken(Integer.parseInt(inputs[0]), Integer.parseInt(inputs[1]) ));

	}

	static String janken(int me , int you){
		switch(me - you){
			case -1:
			case 2 :
				return "Won";
			case 0 :
				return "Drew";
			default :
				return "Lost";
		}
	}
}
0