結果
問題 | No.264 じゃんけん |
ユーザー |
![]() |
提出日時 | 2016-09-01 17:35:26 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 121 ms / 5,000 ms |
コード長 | 716 bytes |
コンパイル時間 | 2,224 ms |
コンパイル使用メモリ | 74,408 KB |
実行使用メモリ | 54,224 KB |
最終ジャッジ日時 | 2024-11-15 17:00:28 |
合計ジャッジ時間 | 3,768 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 9 |
ソースコード
/* package whatever; // don't place package name! */ import java.util.*; import java.lang.*; import java.io.*; /* Name of the class has to be "Main" only if the class is public. */ class Ideone { public static void main (String[] args) throws java.lang.Exception { Scanner sc = new Scanner(System.in); int a,b; String c; a = sc.nextInt(); b = sc.nextInt(); if(a==0){ if(b==1){ c="Won"; }else if(b==2){ c="Lost"; }else{ c="Drew"; } }else if(a==1){ if(b==1){ c="Drew"; }else if(b==2){ c="Won"; }else{ c="Lost"; } }else{ if(b==1){ c="Lost"; }else if(b==2){ c="Drew"; }else{ c="Won"; } } System.out.println(c); } }