結果

問題 No.201 yukicoderじゃんけん
ユーザー matsuyoshi30matsuyoshi30
提出日時 2018-10-04 23:33:46
言語 Java21
(openjdk 21)
結果
AC  
実行時間 164 ms / 5,000 ms
コード長 677 bytes
コンパイル時間 2,239 ms
コンパイル使用メモリ 71,844 KB
実行使用メモリ 56,576 KB
最終ジャッジ日時 2023-08-02 16:30:58
合計ジャッジ時間 6,107 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 111 ms
55,876 KB
testcase_01 AC 114 ms
55,700 KB
testcase_02 AC 114 ms
55,740 KB
testcase_03 AC 119 ms
56,196 KB
testcase_04 AC 114 ms
55,568 KB
testcase_05 AC 115 ms
55,852 KB
testcase_06 AC 117 ms
55,760 KB
testcase_07 AC 113 ms
55,820 KB
testcase_08 AC 120 ms
55,384 KB
testcase_09 AC 119 ms
55,808 KB
testcase_10 AC 117 ms
56,416 KB
testcase_11 AC 117 ms
55,872 KB
testcase_12 AC 119 ms
56,280 KB
testcase_13 AC 120 ms
55,576 KB
testcase_14 AC 120 ms
55,624 KB
testcase_15 AC 152 ms
56,332 KB
testcase_16 AC 152 ms
56,012 KB
testcase_17 AC 164 ms
56,576 KB
testcase_18 AC 156 ms
56,352 KB
testcase_19 AC 155 ms
56,172 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String sa, sb, pa, pb, xa, xb;
        sa = in.next();
        pa = in.next();
        xa = in.next();
        sb = in.next();
        pb = in.next();
        xb = in.next();

        if(pa.length() > pb.length()) {
            System.out.println(sa);
        } else if(pb.length() > pa.length()) {
            System.out.println(sb);
        } else {
            int t = pa.compareTo(pb);
            if(t > 0) System.out.println(sa);
            else if(t < 0) System.out.println(sb);
            else System.out.println(-1);
        }
    }
}
0