結果

問題 No.264 じゃんけん
ユーザー KahoMatsumotoKahoMatsumoto
提出日時 2017-05-26 23:33:54
言語 Java21
(openjdk 21)
結果
AC  
実行時間 128 ms / 5,000 ms
コード長 661 bytes
コンパイル時間 3,101 ms
コンパイル使用メモリ 74,612 KB
実行使用メモリ 57,588 KB
最終ジャッジ日時 2023-10-20 00:19:53
合計ジャッジ時間 4,984 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
57,588 KB
testcase_01 AC 112 ms
56,604 KB
testcase_02 AC 121 ms
57,552 KB
testcase_03 AC 128 ms
55,244 KB
testcase_04 AC 123 ms
57,424 KB
testcase_05 AC 122 ms
57,544 KB
testcase_06 AC 122 ms
57,508 KB
testcase_07 AC 121 ms
57,464 KB
testcase_08 AC 122 ms
57,456 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
public class No264 {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n, k;
    n = sc.nextInt();
    k = sc.nextInt();
    if (n == k) {
      System.out.println("Drew");
    } else if (n == 0) {
      if (k == 1) {
        System.out.println("Won");
      } else {
        System.out.println("Lost");
      }
    } else if (n == 1) {
      if (k == 0) {
        System.out.println("Lost");
      } else  {
        System.out.println("Won");
      }
    } else  {
      if (k == 0) {
        System.out.println("Won");
      } else  {
        System.out.println("Lost");
      }
    }
  }
}
0