結果

問題 No.201 yukicoderじゃんけん
ユーザー tsunabittsunabit
提出日時 2019-05-22 23:43:11
言語 Java21
(openjdk 21)
結果
AC  
実行時間 176 ms / 5,000 ms
コード長 847 bytes
コンパイル時間 3,727 ms
コンパイル使用メモリ 75,588 KB
実行使用メモリ 57,856 KB
最終ジャッジ日時 2023-10-17 11:23:46
合計ジャッジ時間 7,320 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 128 ms
57,076 KB
testcase_01 AC 131 ms
57,344 KB
testcase_02 AC 130 ms
57,388 KB
testcase_03 AC 135 ms
57,420 KB
testcase_04 AC 132 ms
57,444 KB
testcase_05 AC 131 ms
55,604 KB
testcase_06 AC 129 ms
57,392 KB
testcase_07 AC 131 ms
57,356 KB
testcase_08 AC 136 ms
57,500 KB
testcase_09 AC 133 ms
57,472 KB
testcase_10 AC 135 ms
57,388 KB
testcase_11 AC 138 ms
57,384 KB
testcase_12 AC 135 ms
57,444 KB
testcase_13 AC 142 ms
57,384 KB
testcase_14 AC 136 ms
57,080 KB
testcase_15 AC 168 ms
57,856 KB
testcase_16 AC 174 ms
57,624 KB
testcase_17 AC 174 ms
57,636 KB
testcase_18 AC 172 ms
57,600 KB
testcase_19 AC 176 ms
57,628 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.ArrayList;
import java.util.Scanner;
import java.util.Collections;

public class No201 {
    public static void main(String[] args) {
        // 標準入力から読み込む際に、Scannerオブジェクトを使う。
        Scanner s = new Scanner(System.in);
//        𝑆𝐴 𝑃𝐴 𝑋𝐴
//        𝑆𝐵 𝑃𝐵 𝑋𝐵
        String sa = s.next();
        String pa = s.next();
        String xa = s.next();
        
        String sb = s.next();
        String pb = s.next();
        String xb = s.next();
        
        if(pa.length() == pb.length()) {
        	if(pa.equals(pb)) {
        		System.out.println(-1);
        	}else {
        		System.out.println(pa.compareTo(pb) > 0? sa : sb);
        	}
        }else {
        	System.out.println(pa.length() > pb.length()? sa : sb);
        }
    }
}
0