結果

問題 No.264 じゃんけん
ユーザー veroomveroom
提出日時 2016-10-10 12:17:47
言語 Java21
(openjdk 21)
結果
AC  
実行時間 141 ms / 5,000 ms
コード長 524 bytes
コンパイル時間 3,518 ms
コンパイル使用メモリ 74,980 KB
実行使用メモリ 54,196 KB
最終ジャッジ日時 2024-05-01 18:53:48
合計ジャッジ時間 5,273 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 140 ms
54,196 KB
testcase_01 AC 137 ms
53,900 KB
testcase_02 AC 141 ms
53,984 KB
testcase_03 AC 139 ms
54,180 KB
testcase_04 AC 136 ms
54,092 KB
testcase_05 AC 137 ms
54,152 KB
testcase_06 AC 140 ms
53,748 KB
testcase_07 AC 136 ms
54,188 KB
testcase_08 AC 130 ms
53,876 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukicoder;

import java.util.Scanner;

public class Yukicoder {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int you = sc.nextInt();
		int opponent = sc.nextInt();

		if (you == 0 && opponent == 2) {
			System.out.println("Lost");
		}else if (you == 2 && opponent == 0) {
			System.out.println("Won");
		} else if (you < opponent) {
			System.out.println("Won");
		} else if (you == opponent) {
			System.out.println("Drew");
		} else {
			System.out.println("Lost");
		}
	}
}
0