結果

問題 No.264 じゃんけん
ユーザー youthfuldays072youthfuldays072
提出日時 2018-05-20 11:58:54
言語 Java21
(openjdk 21)
結果
AC  
実行時間 131 ms / 5,000 ms
コード長 486 bytes
コンパイル時間 2,424 ms
コンパイル使用メモリ 71,284 KB
実行使用メモリ 56,560 KB
最終ジャッジ日時 2023-09-10 23:57:27
合計ジャッジ時間 3,906 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
55,836 KB
testcase_01 AC 131 ms
53,536 KB
testcase_02 AC 120 ms
55,448 KB
testcase_03 AC 122 ms
56,560 KB
testcase_04 AC 122 ms
55,532 KB
testcase_05 AC 123 ms
55,492 KB
testcase_06 AC 123 ms
55,612 KB
testcase_07 AC 124 ms
55,408 KB
testcase_08 AC 123 ms
55,760 KB
権限があれば一括ダウンロードができます

ソースコード

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