結果
問題 |
No.138 化石のバージョン
|
ユーザー |
![]() |
提出日時 | 2016-11-13 07:10:44 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,053 bytes |
コンパイル時間 | 1,893 ms |
コンパイル使用メモリ | 77,032 KB |
実行使用メモリ | 41,396 KB |
最終ジャッジ日時 | 2024-11-25 21:48:03 |
合計ジャッジ時間 | 7,039 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 29 WA * 4 |
ソースコード
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"); } } } } }