結果

問題 No.264 じゃんけん
ユーザー papipenpapipen
提出日時 2017-03-23 23:26:29
言語 Java19
(openjdk 21)
結果
AC  
実行時間 132 ms / 5,000 ms
コード長 393 bytes
コンパイル時間 4,139 ms
コンパイル使用メモリ 71,100 KB
実行使用メモリ 56,084 KB
最終ジャッジ日時 2023-09-19 06:47:26
合計ジャッジ時間 6,360 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 127 ms
55,656 KB
testcase_01 AC 127 ms
55,480 KB
testcase_02 AC 129 ms
55,748 KB
testcase_03 AC 128 ms
55,400 KB
testcase_04 AC 132 ms
53,948 KB
testcase_05 AC 128 ms
55,708 KB
testcase_06 AC 128 ms
55,408 KB
testcase_07 AC 129 ms
55,700 KB
testcase_08 AC 126 ms
56,084 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
class Janken{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    if(a == b){
      System.out.println("Drew");
    }else if((a == 0 && b == 1) || (a == 1 && b == 2) || (a == 2 && b == 0)){
      System.out.println("Won");
    }else{
      System.out.println("Lost");
    }
  }
}
0