結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 107 ms
40,320 KB
testcase_01 AC 122 ms
41,428 KB
testcase_02 AC 120 ms
41,024 KB
testcase_03 AC 116 ms
40,880 KB
testcase_04 AC 112 ms
40,232 KB
testcase_05 AC 124 ms
41,200 KB
testcase_06 AC 125 ms
41,360 KB
testcase_07 AC 111 ms
39,872 KB
testcase_08 AC 126 ms
41,388 KB
testcase_09 AC 114 ms
39,844 KB
testcase_10 AC 111 ms
40,084 KB
testcase_11 AC 127 ms
41,244 KB
testcase_12 AC 149 ms
41,320 KB
testcase_13 AC 148 ms
41,124 KB
testcase_14 AC 122 ms
41,256 KB
testcase_15 AC 138 ms
41,264 KB
testcase_16 AC 155 ms
41,588 KB
testcase_17 AC 153 ms
41,480 KB
testcase_18 AC 142 ms
41,328 KB
testcase_19 AC 162 ms
41,348 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