結果

問題 No.201 yukicoderじゃんけん
ユーザー YamaKasaYamaKasa
提出日時 2018-05-18 15:41:00
言語 Java21
(openjdk 21)
結果
AC  
実行時間 170 ms / 5,000 ms
コード長 846 bytes
コンパイル時間 1,964 ms
コンパイル使用メモリ 73,968 KB
実行使用メモリ 56,264 KB
最終ジャッジ日時 2023-09-10 22:53:32
合計ジャッジ時間 5,638 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
55,952 KB
testcase_01 AC 119 ms
55,392 KB
testcase_02 AC 121 ms
55,972 KB
testcase_03 AC 123 ms
53,696 KB
testcase_04 AC 123 ms
55,604 KB
testcase_05 AC 121 ms
55,576 KB
testcase_06 AC 121 ms
55,168 KB
testcase_07 AC 120 ms
55,756 KB
testcase_08 AC 124 ms
55,160 KB
testcase_09 AC 125 ms
55,556 KB
testcase_10 AC 121 ms
55,656 KB
testcase_11 AC 127 ms
55,800 KB
testcase_12 AC 129 ms
55,896 KB
testcase_13 AC 126 ms
55,424 KB
testcase_14 AC 122 ms
55,408 KB
testcase_15 AC 162 ms
56,260 KB
testcase_16 AC 156 ms
56,264 KB
testcase_17 AC 157 ms
56,076 KB
testcase_18 AC 159 ms
56,232 KB
testcase_19 AC 170 ms
55,908 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String Sa = scan.next();
		String Pa = scan.next();
		String Xa = scan.next();
		String Sb = scan.next();
		String Pb = scan.next();

		String Xb = scan.next();
		if(Xa.equals(Xb)) {
		}
		scan.close();

		if(Pa.length() > Pb.length()) {
			System.out.println(Sa);
			System.exit(0);
		}else if(Pa.length() < Pb.length()) {
			System.out.println(Sb);
			System.exit(0);
		}else {
			for(int i = 0; i < Pa.length(); i++) {
				int a = Integer.parseInt(Pa.substring(i, i + 1));
				int b = Integer.parseInt(Pb.substring(i, i + 1));
				if(a > b) {
					System.out.println(Sa);
					System.exit(0);
				}else if(a < b) {
					System.out.println(Sb);
					System.exit(0);
				}
			}
		}
		System.out.println(-1);

	}
}
0