結果
問題 |
No.264 じゃんけん
|
ユーザー |
![]() |
提出日時 | 2017-05-04 18:54:48 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 54 ms / 5,000 ms |
コード長 | 630 bytes |
コンパイル時間 | 3,398 ms |
コンパイル使用メモリ | 74,356 KB |
実行使用メモリ | 36,984 KB |
最終ジャッジ日時 | 2024-09-14 07:11:24 |
合計ジャッジ時間 | 4,173 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 9 |
ソースコード
/*No.264 じゃんけん*/ import java.io.*; public class No264 { public static void main(String[] args) { String s_battle,h_battle[]=new String[2]; byte me,you; try(BufferedReader input =new BufferedReader(new InputStreamReader(System.in))){ s_battle =input.readLine(); h_battle=s_battle.split(" "); me =Byte.parseByte(h_battle[0]); you =Byte.parseByte(h_battle[1]); if(me-you==-1||me-you==2){ System.out.println("Won"); }else if(me==you){ System.out.println("Drew"); }else if(me-you==-2||me-you==1){ System.out.println("Lost"); } }catch(Exception e){ e.printStackTrace(); } } }