結果

問題 No.201 yukicoderじゃんけん
ユーザー takutakutakutaku
提出日時 2020-09-24 16:49:07
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 830 bytes
コンパイル時間 3,391 ms
コンパイル使用メモリ 71,684 KB
実行使用メモリ 56,164 KB
最終ジャッジ日時 2023-09-10 13:30:59
合計ジャッジ時間 6,654 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
56,108 KB
testcase_01 AC 120 ms
56,000 KB
testcase_02 AC 120 ms
56,132 KB
testcase_03 WA -
testcase_04 AC 127 ms
55,720 KB
testcase_05 AC 128 ms
56,144 KB
testcase_06 AC 124 ms
55,684 KB
testcase_07 WA -
testcase_08 AC 123 ms
55,772 KB
testcase_09 AC 123 ms
55,504 KB
testcase_10 AC 128 ms
54,176 KB
testcase_11 AC 125 ms
56,088 KB
testcase_12 AC 122 ms
55,784 KB
testcase_13 AC 123 ms
55,772 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 181 ms
55,868 KB
testcase_17 AC 176 ms
55,932 KB
testcase_18 AC 167 ms
55,904 KB
testcase_19 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        String[] p1 = sc.nextLine().split(" ",0);
        String[] p2 = sc.nextLine().split(" ",0);
        
        String name1 = p1[0];
        String point1 = p1[1];
        String hand1 = p1[2];
        
        String name2 = p2[0];
        String point2 = p2[1];
        String hand2 = p2[2];
        
        if(point1.compareTo(point2) == 1) {
            if(point1.equals(point2)) {
                System.out.println("-1");
            }else{
                System.out.println(name1);
            }
        }else if(point1.equals(point2)) {
            System.out.println("-1");
        }else {
            System.out.println(name2);
        }
        
    }
}
0