結果

問題 No.264 じゃんけん
ユーザー youthfuldays072
提出日時 2018-05-20 11:58:54
言語 Java
(openjdk 23)
結果
AC  
実行時間 132 ms / 5,000 ms
コード長 486 bytes
コンパイル時間 1,959 ms
コンパイル使用メモリ 74,596 KB
実行使用メモリ 41,516 KB
最終ジャッジ日時 2024-06-28 14:36:17
合計ジャッジ時間 3,671 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;


public class Main {


    public static void main(String[] args) {

    	Scanner sc=new Scanner(System.in);

    	int myhand=sc.nextInt();
    	int comhand=sc.nextInt();

    	System.out.println(judge(myhand,comhand));

    }

    static String judge(int myhand,int comhand) {

    	int judge=(myhand-comhand+3)%3;

    	if(judge==0) {
    		return "Drew";
    	}else if(judge==2) {
    		return "Won";
    	}else {
    		return "Lost";
    	}


    }




}
0