結果

問題 No.264 じゃんけん
ユーザー newoota0331newoota0331
提出日時 2016-09-01 17:35:26
言語 Java21
(openjdk 21)
結果
AC  
実行時間 123 ms / 5,000 ms
コード長 716 bytes
コンパイル時間 1,920 ms
コンパイル使用メモリ 71,612 KB
実行使用メモリ 56,416 KB
最終ジャッジ日時 2023-08-09 19:50:35
合計ジャッジ時間 3,901 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
55,904 KB
testcase_01 AC 123 ms
56,108 KB
testcase_02 AC 121 ms
55,904 KB
testcase_03 AC 119 ms
55,904 KB
testcase_04 AC 122 ms
55,740 KB
testcase_05 AC 119 ms
55,636 KB
testcase_06 AC 120 ms
55,708 KB
testcase_07 AC 120 ms
56,416 KB
testcase_08 AC 120 ms
56,356 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner sc = new Scanner(System.in);
		int a,b;
		String c;
		
		a = sc.nextInt();
		b = sc.nextInt();
		
		if(a==0){
			if(b==1){
				c="Won";
			}else if(b==2){
				c="Lost";
			}else{
				c="Drew";
			}
		}else if(a==1){
			if(b==1){
				c="Drew";
			}else if(b==2){
				c="Won";
			}else{
				c="Lost";
			}
		}else{
			if(b==1){
				c="Lost";
			}else if(b==2){
				c="Drew";
			}else{
				c="Won";
			}
		}
		
		System.out.println(c);
	}
}
0