結果
問題 |
No.138 化石のバージョン
|
ユーザー |
![]() |
提出日時 | 2018-02-09 18:46:07 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 121 ms / 5,000 ms |
コード長 | 485 bytes |
コンパイル時間 | 1,993 ms |
コンパイル使用メモリ | 74,488 KB |
実行使用メモリ | 41,544 KB |
最終ジャッジ日時 | 2024-10-07 23:27:07 |
合計ジャッジ時間 | 7,009 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 33 |
ソースコード
import java.util.*; public class Main { static Scanner sc = new Scanner(System.in); public static void main(String[] args) { String[] a = sc.next().split("\\."); String[] b = sc.next().split("\\."); int[] x = new int[3]; int[] y = new int[3]; for (int i=0; i<3; i++) { x[i] = Integer.parseInt(a[i]); y[i] = Integer.parseInt(b[i]); } long c = x[2] + x[1]*1000 + x[0]*1000000; long d = y[2] + y[1]*1000 + y[0]*1000000; System.out.println(c<d?"NO":"YES"); } }