結果

問題 No.264 じゃんけん
ユーザー yamax3232yamax3232
提出日時 2017-02-09 20:49:54
言語 Java21
(openjdk 21)
結果
AC  
実行時間 129 ms / 5,000 ms
コード長 397 bytes
コンパイル時間 3,243 ms
コンパイル使用メモリ 71,456 KB
実行使用メモリ 56,128 KB
最終ジャッジ日時 2023-08-26 22:41:11
合計ジャッジ時間 5,264 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 127 ms
55,724 KB
testcase_01 AC 123 ms
55,564 KB
testcase_02 AC 125 ms
55,336 KB
testcase_03 AC 129 ms
55,488 KB
testcase_04 AC 125 ms
56,128 KB
testcase_05 AC 127 ms
55,940 KB
testcase_06 AC 127 ms
55,840 KB
testcase_07 AC 125 ms
55,724 KB
testcase_08 AC 124 ms
55,520 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
public class Janken {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
Scanner kb=new Scanner(System.in);
int a=kb.nextInt();
int b=kb.nextInt();
if((a==2&&b==0)||(a==1&&b==2)||(a==0&&b==1)){
	System.out.println("Won");
}else if(a==b){
	System.out.println("Drew");
}else{
	System.out.println("Lost");
}
kb.close();
	}

}
0