結果

問題 No.264 じゃんけん
ユーザー kazapyon27kazapyon27
提出日時 2017-05-04 18:54:48
言語 Java19
(openjdk 21)
結果
AC  
実行時間 42 ms / 5,000 ms
コード長 630 bytes
コンパイル時間 3,344 ms
コンパイル使用メモリ 71,388 KB
実行使用メモリ 33,808 KB
最終ジャッジ日時 2023-10-12 08:04:20
合計ジャッジ時間 3,960 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
33,500 KB
testcase_01 AC 39 ms
33,584 KB
testcase_02 AC 40 ms
33,356 KB
testcase_03 AC 42 ms
33,176 KB
testcase_04 AC 41 ms
33,808 KB
testcase_05 AC 40 ms
33,316 KB
testcase_06 AC 39 ms
33,352 KB
testcase_07 AC 39 ms
33,288 KB
testcase_08 AC 39 ms
33,288 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

/*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();
		}
	}
}
0