結果

問題 No.201 yukicoderじゃんけん
ユーザー matsuyoshi30matsuyoshi30
提出日時 2018-10-04 23:33:46
言語 Java21
(openjdk 21)
結果
AC  
実行時間 147 ms / 5,000 ms
コード長 677 bytes
コンパイル時間 2,410 ms
コンパイル使用メモリ 76,336 KB
実行使用メモリ 41,696 KB
最終ジャッジ日時 2024-04-20 16:35:50
合計ジャッジ時間 5,474 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 112 ms
41,148 KB
testcase_01 AC 98 ms
40,136 KB
testcase_02 AC 101 ms
41,128 KB
testcase_03 AC 106 ms
41,140 KB
testcase_04 AC 111 ms
41,252 KB
testcase_05 AC 112 ms
41,376 KB
testcase_06 AC 99 ms
41,276 KB
testcase_07 AC 113 ms
41,076 KB
testcase_08 AC 120 ms
41,204 KB
testcase_09 AC 119 ms
41,696 KB
testcase_10 AC 112 ms
39,900 KB
testcase_11 AC 110 ms
41,236 KB
testcase_12 AC 108 ms
41,160 KB
testcase_13 AC 108 ms
39,900 KB
testcase_14 AC 116 ms
41,520 KB
testcase_15 AC 142 ms
41,508 KB
testcase_16 AC 146 ms
41,080 KB
testcase_17 AC 141 ms
41,356 KB
testcase_18 AC 147 ms
41,584 KB
testcase_19 AC 128 ms
41,652 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