結果

問題 No.138 化石のバージョン
ユーザー takeya_okinotakeya_okino
提出日時 2017-06-22 23:12:25
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 527 bytes
コンパイル時間 2,456 ms
コンパイル使用メモリ 77,212 KB
実行使用メモリ 56,196 KB
最終ジャッジ日時 2024-10-02 12:21:51
合計ジャッジ時間 8,659 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 2
other AC * 18 WA * 15
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String s1 = sc.nextLine();
    String s2 = sc.nextLine();
    String[] s1d = s1.split("\\.");
    String[] s2d = s2.split("\\.");
    String ans = "NO";
    for(int i = 0; i < 3; i++) {
      int a = Integer.parseInt(s1d[i]);
      int b = Integer.parseInt(s2d[i]);
      if(a > b) {
        ans = "YES";
        break;
      }
      if(i == 2) ans = "YES";
    }
    System.out.println(ans);
  }
}
0