結果
問題 |
No.138 化石のバージョン
|
ユーザー |
![]() |
提出日時 | 2016-11-13 07:11:50 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 134 ms / 5,000 ms |
コード長 | 1,054 bytes |
コンパイル時間 | 5,024 ms |
コンパイル使用メモリ | 79,728 KB |
実行使用メモリ | 41,400 KB |
最終ジャッジ日時 | 2024-12-29 14:14:22 |
合計ジャッジ時間 | 8,116 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 33 |
ソースコード
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String s0 = sc.nextLine(); String [] arr0 = s0.split("\\."); int A0 = Integer.parseInt(arr0[0]); int B0 = Integer.parseInt(arr0[1]); int C0 = Integer.parseInt(arr0[2]); String s1 = sc.nextLine(); String [] arr1 = s1.split("\\."); int A1 = Integer.parseInt(arr1[0]); int B1 = Integer.parseInt(arr1[1]); int C1 = Integer.parseInt(arr1[2]); if(A1>A0){ System.out.println("NO"); }else if(A1<A0){ System.out.println("YES"); }else{ if(B1>B0){ System.out.println("NO"); }else if(B1<B0){ System.out.println("YES"); }else{ if(C1>C0){ System.out.println("NO"); }else if(C1<=C0){ System.out.println("YES"); } } } } }