結果

問題 No.201 yukicoderじゃんけん
ユーザー fal_rndfal_rnd
提出日時 2017-08-25 23:45:05
言語 Java21
(openjdk 21)
結果
AC  
実行時間 170 ms / 5,000 ms
コード長 817 bytes
コンパイル時間 2,355 ms
コンパイル使用メモリ 81,172 KB
実行使用メモリ 41,464 KB
最終ジャッジ日時 2024-10-15 16:16:11
合計ジャッジ時間 6,128 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
41,288 KB
testcase_01 AC 129 ms
41,156 KB
testcase_02 AC 128 ms
41,176 KB
testcase_03 AC 135 ms
41,156 KB
testcase_04 AC 130 ms
41,252 KB
testcase_05 AC 134 ms
41,380 KB
testcase_06 AC 130 ms
40,920 KB
testcase_07 AC 130 ms
41,200 KB
testcase_08 AC 132 ms
41,412 KB
testcase_09 AC 131 ms
41,464 KB
testcase_10 AC 133 ms
41,428 KB
testcase_11 AC 134 ms
41,152 KB
testcase_12 AC 135 ms
41,088 KB
testcase_13 AC 134 ms
41,256 KB
testcase_14 AC 116 ms
40,100 KB
testcase_15 AC 167 ms
41,408 KB
testcase_16 AC 162 ms
41,072 KB
testcase_17 AC 162 ms
41,216 KB
testcase_18 AC 164 ms
41,376 KB
testcase_19 AC 170 ms
41,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
import java.util.stream.IntStream;

public class Main{
	static IntStream REPS(int v){return IntStream.range(0,v);}
	static IntStream REPS(int l,int r){return IntStream.rangeClosed(l,r);}
	static IntStream INS(int n) {return REPS(n).map(i->getInt());}
	static Scanner s=new Scanner(System.in);
	static int getInt(){return Integer.parseInt(s.next());}

	public static void main(String[]$){
		String na=s.next();
		String a=s.next();
		s.next();
		String nb=s.next();
		String b=s.next();
		
		if(a.equals(b)) {
			System.out.println(-1);
			return;
		}
		if(a.length()>b.length()) {
			System.out.println(na);
			return;
		}
		if(a.length()<b.length()) {
			System.out.println(nb);
			return;
		}
		if(a.compareTo(b)>0){
			System.out.println(na);
			return;
		}
		System.out.println(nb);
	}
}
0