結果
問題 | No.264 じゃんけん |
ユーザー |
![]() |
提出日時 | 2015-12-29 02:58:56 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 116 ms / 5,000 ms |
コード長 | 1,204 bytes |
コンパイル時間 | 2,621 ms |
コンパイル使用メモリ | 75,040 KB |
実行使用メモリ | 41,508 KB |
最終ジャッジ日時 | 2024-09-19 08:22:16 |
合計ジャッジ時間 | 3,862 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 9 |
ソースコード
import java.util.Scanner; class Test { public static void main(String[] args) { Scanner in = new Scanner(System.in); String str1 = in.next(); String str2 = in.next(); int n1 = Integer.parseInt(str1); int n2 = Integer.parseInt(str2); switch(n1) { case 0: if(n2 == 0) { System.out.println("Drew"); } else if(n2 == 1) { System.out.println("Won"); } else { System.out.println("Lost"); } break; case 1: if(n2 == 0) { System.out.println("Lost"); } else if(n2 == 1) { System.out.println("Drew"); } else { System.out.println("Won"); } break; case 2: if(n2 == 0) { System.out.println("Won"); } else if(n2 == 1) { System.out.println("Lost"); } else { System.out.println("Drew"); } break; } } }