結果

問題 No.201 yukicoderじゃんけん
ユーザー YamaKasaYamaKasa
提出日時 2018-05-18 15:33:49
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 807 bytes
コンパイル時間 2,109 ms
コンパイル使用メモリ 73,992 KB
実行使用メモリ 56,728 KB
最終ジャッジ日時 2023-09-10 22:53:15
合計ジャッジ時間 5,936 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
55,580 KB
testcase_01 AC 121 ms
55,524 KB
testcase_02 AC 119 ms
55,860 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 122 ms
55,492 KB
testcase_06 AC 121 ms
55,736 KB
testcase_07 AC 118 ms
53,344 KB
testcase_08 AC 125 ms
55,380 KB
testcase_09 AC 126 ms
55,472 KB
testcase_10 WA -
testcase_11 AC 126 ms
55,908 KB
testcase_12 AC 125 ms
56,100 KB
testcase_13 AC 124 ms
55,572 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 155 ms
55,860 KB
testcase_17 AC 156 ms
56,016 KB
testcase_18 AC 170 ms
56,088 KB
testcase_19 AC 179 ms
56,100 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);
		}else if(Pa.length() < Pb.length()) {
			System.out.println(Sb);
		}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