結果

問題 No.138 化石のバージョン
ユーザー ちよちゃんちよちゃん
提出日時 2016-05-30 15:42:58
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 990 bytes
コンパイル時間 3,478 ms
コンパイル使用メモリ 75,024 KB
実行使用メモリ 54,512 KB
最終ジャッジ日時 2024-04-16 18:41:46
合計ジャッジ時間 9,465 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 129 ms
41,148 KB
testcase_01 AC 126 ms
41,396 KB
testcase_02 AC 128 ms
41,384 KB
testcase_03 WA -
testcase_04 AC 127 ms
41,392 KB
testcase_05 AC 127 ms
41,164 KB
testcase_06 AC 128 ms
41,512 KB
testcase_07 AC 129 ms
41,356 KB
testcase_08 AC 127 ms
41,508 KB
testcase_09 AC 129 ms
41,400 KB
testcase_10 AC 128 ms
41,028 KB
testcase_11 AC 128 ms
41,404 KB
testcase_12 AC 128 ms
41,052 KB
testcase_13 AC 127 ms
41,252 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 128 ms
41,352 KB
testcase_20 AC 127 ms
41,028 KB
testcase_21 WA -
testcase_22 AC 129 ms
41,408 KB
testcase_23 AC 128 ms
41,392 KB
testcase_24 AC 127 ms
41,180 KB
testcase_25 AC 126 ms
41,288 KB
testcase_26 AC 128 ms
41,556 KB
testcase_27 AC 127 ms
41,400 KB
testcase_28 AC 126 ms
41,368 KB
testcase_29 AC 128 ms
41,748 KB
testcase_30 AC 126 ms
41,024 KB
testcase_31 AC 127 ms
41,424 KB
testcase_32 AC 127 ms
41,232 KB
testcase_33 AC 126 ms
41,556 KB
testcase_34 AC 130 ms
41,168 KB
testcase_35 AC 129 ms
41,504 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukicoder;

import java.util.Scanner;

public class Yuki138 {
	
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		String str1 = scan.next();
		String str2 = scan.next();
		scan.close();
		System.out.println(judgeNumbers(str1, str2));
	}
	
	private static String judgeNumbers(String str1,String str2) {
		//String com_numbers1 = "";
		//String com_numbers2 = "";
		String[] str1arr = str1.split("\\.");
		String[] str2arr = str2.split("\\.");

		for(int i = 0; i < str1arr.length; i++){
				if(Integer.parseInt(str1arr[i])<=Integer.parseInt(str2arr[i])){
					return "NO";
				}else if(Integer.parseInt(str1arr[i])>Integer.parseInt(str2arr[i])){
					break;
				}
		}
		/*
		for(int i = 0; i < str1arr.length; i++){
			com_numbers1 += str1arr[i];
		}
		for(int i = 0; i < str2arr.length; i++){
			com_numbers2 += str2arr[i];
		}
		
		
		if(Integer.parseInt(com_numbers1)<Integer.parseInt(com_numbers2)){
			return "NO";
		}
		*/
		return "YES";
	}
}
0