結果

問題 No.138 化石のバージョン
ユーザー TatsuDX
提出日時 2016-09-08 23:54:16
言語 Java
(openjdk 23)
結果
AC  
実行時間 142 ms / 5,000 ms
コード長 475 bytes
コンパイル時間 5,567 ms
コンパイル使用メモリ 75,832 KB
実行使用メモリ 41,704 KB
最終ジャッジ日時 2024-12-29 14:09:01
合計ジャッジ時間 9,699 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 33
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Test {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int n = 0, m = 0;
		String[] s = sc.next().split("\\.");
		for (int i = 0; i < 3; i++) {
			n *= 1000;
			n += Integer.parseInt(s[i]);
		}
		s = sc.next().split("\\.");
		for (int i = 0; i < 3; i++) {
			m *= 1000;
			m += Integer.parseInt(s[i]);
		}
		if (n < m) {
			System.out.println("NO");
		} else {
			System.out.println("YES");
		}
	}
}
0