結果
問題 | No.264 じゃんけん |
ユーザー | len_discoreg |
提出日時 | 2016-06-02 17:44:14 |
言語 | Java21 (openjdk 21) |
結果 |
WA
|
実行時間 | - |
コード長 | 754 bytes |
コンパイル時間 | 1,997 ms |
コンパイル使用メモリ | 74,664 KB |
実行使用メモリ | 54,216 KB |
最終ジャッジ日時 | 2024-04-16 23:14:03 |
合計ジャッジ時間 | 4,048 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | AC | 124 ms
41,412 KB |
testcase_02 | AC | 126 ms
41,924 KB |
testcase_03 | AC | 124 ms
41,348 KB |
testcase_04 | WA | - |
testcase_05 | AC | 117 ms
41,488 KB |
testcase_06 | AC | 118 ms
41,156 KB |
testcase_07 | AC | 124 ms
41,184 KB |
testcase_08 | WA | - |
ソースコード
import java.util.Scanner; /** * 0 = グー * 1 = チョキ * 2 = パー */ class Main{ public static void main(String[] args){ Scanner scan = new Scanner(System.in); int N = scan.nextInt(); int K = scan.nextInt(); checkAndDispHand(N,K); } public static void checkAndDispHand(int N, int K){ if(N == K){ System.out.println("Draw"); } if(N == 0){ if(K == 1){ System.out.println("Won"); }else if(K == 2){ System.out.println("Lost"); } } if(N == 1){ if(K == 0){ System.out.println("Lost"); }else if(K == 2){ System.out.println("Won"); } } if(N == 2){ if(K == 0){ System.out.println("Won"); }else if(K == 1){ System.out.println("Lost"); } } } }