結果

問題 No.138 化石のバージョン
ユーザー omc-test
提出日時 2016-08-03 15:00:38
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 463 bytes
コンパイル時間 2,109 ms
コンパイル使用メモリ 75,072 KB
実行使用メモリ 41,500 KB
最終ジャッジ日時 2024-11-06 23:43:33
合計ジャッジ時間 7,907 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 32 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int kaseki = getVersion(sc.next());
		int judge = getVersion(sc.next());
		sc.close();
		System.out.println(kaseki >= judge ? "YES" : "NO");
	}

	public static int getVersion(String version){
		String[] s = version.split("\\.");
		int no = 0;
		for(int i=0; i<3; i++){
			no = no * 100 + Integer.valueOf(s[i]);
		}
		return no;
	}
}
0