結果

問題 No.264 じゃんけん
ユーザー clamdclamd
提出日時 2016-12-10 11:43:40
言語 Java21
(openjdk 21)
結果
AC  
実行時間 126 ms / 5,000 ms
コード長 418 bytes
コンパイル時間 3,423 ms
コンパイル使用メモリ 71,624 KB
実行使用メモリ 56,064 KB
最終ジャッジ日時 2023-08-19 09:16:34
合計ジャッジ時間 5,434 ms
ジャッジサーバーID
(参考情報)
judge9 / judge10
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
56,060 KB
testcase_01 AC 125 ms
55,744 KB
testcase_02 AC 123 ms
55,612 KB
testcase_03 AC 123 ms
56,064 KB
testcase_04 AC 121 ms
55,628 KB
testcase_05 AC 124 ms
55,976 KB
testcase_06 AC 125 ms
55,848 KB
testcase_07 AC 126 ms
55,932 KB
testcase_08 AC 123 ms
55,632 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class janken {
	public static void main(String[] args){
		Scanner sn = new Scanner(System.in);
		int first = sn.nextInt();
		int later = sn.nextInt();
		if(first == later){
			System.out.println("Drew");
		}else if((first == 0 && later == 1) || (first == 1 && later == 2) || (first == 2 && later == 0)){
			System.out.println("Won");
		}else{
			System.out.println("Lost");
		}
	}
}
0