結果

問題 No.201 yukicoderじゃんけん
ユーザー takutakutakutaku
提出日時 2020-09-24 17:06:44
言語 Java21
(openjdk 21)
結果
AC  
実行時間 162 ms / 5,000 ms
コード長 1,014 bytes
コンパイル時間 1,976 ms
コンパイル使用メモリ 71,552 KB
実行使用メモリ 56,132 KB
最終ジャッジ日時 2023-09-10 13:31:15
合計ジャッジ時間 5,703 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
55,960 KB
testcase_01 AC 119 ms
55,764 KB
testcase_02 AC 119 ms
55,792 KB
testcase_03 AC 119 ms
55,600 KB
testcase_04 AC 124 ms
53,764 KB
testcase_05 AC 124 ms
56,020 KB
testcase_06 AC 122 ms
55,812 KB
testcase_07 AC 122 ms
55,756 KB
testcase_08 AC 119 ms
55,624 KB
testcase_09 AC 122 ms
56,036 KB
testcase_10 AC 126 ms
55,700 KB
testcase_11 AC 122 ms
55,732 KB
testcase_12 AC 123 ms
55,900 KB
testcase_13 AC 124 ms
56,132 KB
testcase_14 AC 122 ms
56,076 KB
testcase_15 AC 156 ms
55,732 KB
testcase_16 AC 162 ms
55,796 KB
testcase_17 AC 156 ms
55,692 KB
testcase_18 AC 157 ms
55,964 KB
testcase_19 AC 157 ms
56,008 KB
権限があれば一括ダウンロードができます

ソースコード

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.length() > point2.length()) {
            System.out.println(name1);
        
        }else if(point2.length() > point1.length()) {
            System.out.println(name2);
        
        }else {
            
            if(point1.compareTo(point2) < 0) {
                System.out.println(name2);
                
            }else if(point1.compareTo(point2) > 0) {
                System.out.println(name1);
            
            }else {
                System.out.println(-1);
            }
            
        }
    }
}
0