結果

問題 No.201 yukicoderじゃんけん
ユーザー YatsukuYatsuku
提出日時 2015-12-20 20:58:58
言語 Java21
(openjdk 21)
結果
AC  
実行時間 168 ms / 5,000 ms
コード長 1,025 bytes
コンパイル時間 2,478 ms
コンパイル使用メモリ 77,480 KB
実行使用メモリ 58,080 KB
最終ジャッジ日時 2023-10-17 14:34:24
合計ジャッジ時間 5,896 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
57,716 KB
testcase_01 AC 125 ms
57,384 KB
testcase_02 AC 124 ms
57,408 KB
testcase_03 AC 117 ms
56,272 KB
testcase_04 AC 125 ms
57,488 KB
testcase_05 AC 129 ms
57,912 KB
testcase_06 AC 127 ms
57,324 KB
testcase_07 AC 128 ms
57,920 KB
testcase_08 AC 135 ms
57,924 KB
testcase_09 AC 136 ms
55,760 KB
testcase_10 AC 125 ms
57,104 KB
testcase_11 AC 126 ms
57,424 KB
testcase_12 AC 130 ms
57,408 KB
testcase_13 AC 137 ms
57,780 KB
testcase_14 AC 126 ms
57,400 KB
testcase_15 AC 158 ms
55,604 KB
testcase_16 AC 166 ms
58,080 KB
testcase_17 AC 168 ms
57,892 KB
testcase_18 AC 165 ms
57,532 KB
testcase_19 AC 165 ms
57,880 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

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

		String[] name = new String[2];
		String [] point = new String[2];
		char [] hand = new char[2];

		for (int i = 0; i < 2; i++) {
			name[i] = stdIn.next();
			point[i] = stdIn.next();
			hand[i] = stdIn.next().charAt(0);
		}
		if (point[0].length() > point[1].length()) {
			System.out.println(name[0]);
		} else if (point[1].length() > point[0].length()) {
			System.out.println(name[1]);
		} else if (point[0].length() == point[1].length()){
			for (int i = 0; i < point[0].length(); i++) {
				if ( Character.getNumericValue(point[0].charAt(i)) > Character.getNumericValue(point[1].charAt(i))) {
					System.out.println(name[0]);
					System.exit(0);
				} else if (Character.getNumericValue(point[1].charAt(i)) > Character.getNumericValue(point[0].charAt(i))) {
					System.out.println(name[1]);
					System.exit(0);
				}	else {
					continue;
				}
			}
			System.out.println(-1);
		}
	}
}
0