結果

問題 No.201 yukicoderじゃんけん
ユーザー GrenacheGrenache
提出日時 2015-11-03 12:26:03
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 653 bytes
コンパイル時間 3,204 ms
コンパイル使用メモリ 72,396 KB
実行使用メモリ 58,276 KB
最終ジャッジ日時 2023-10-11 13:19:37
合計ジャッジ時間 7,108 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
55,468 KB
testcase_01 AC 116 ms
56,020 KB
testcase_02 AC 116 ms
55,680 KB
testcase_03 AC 121 ms
56,232 KB
testcase_04 WA -
testcase_05 AC 118 ms
56,012 KB
testcase_06 AC 119 ms
55,468 KB
testcase_07 AC 119 ms
56,108 KB
testcase_08 AC 123 ms
55,844 KB
testcase_09 AC 123 ms
56,332 KB
testcase_10 AC 121 ms
55,972 KB
testcase_11 AC 124 ms
56,376 KB
testcase_12 AC 122 ms
56,100 KB
testcase_13 AC 124 ms
55,700 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 153 ms
56,472 KB
testcase_17 AC 160 ms
56,340 KB
testcase_18 AC 161 ms
56,748 KB
testcase_19 AC 161 ms
56,264 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;


public class Main_yukicoder201 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        String[] s = new String[2];
        String[] p = new String[2];
        String[] x = new String[2];
        for (int i = 0; i < 2; i++) {
        	s[i] = sc.next();
        	p[i] = sc.next();
        	x[i] = sc.next();
        }

        int res = p[0].compareTo(p[1]);
        if (res > 0) {
        	System.out.println(s[0]);
        } else if (res < 0) {
        	System.out.println(s[1]);
        } else {
        	System.out.println("-1");
        }
        
        sc.close();
    }
}
0