結果

問題 No.138 化石のバージョン
ユーザー takeya_okinotakeya_okino
提出日時 2017-06-22 23:12:25
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 527 bytes
コンパイル時間 2,250 ms
コンパイル使用メモリ 74,356 KB
実行使用メモリ 56,032 KB
最終ジャッジ日時 2024-04-10 10:32:18
合計ジャッジ時間 8,371 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 136 ms
54,084 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 137 ms
54,004 KB
testcase_07 AC 135 ms
53,848 KB
testcase_08 AC 135 ms
54,056 KB
testcase_09 AC 133 ms
54,028 KB
testcase_10 AC 133 ms
53,964 KB
testcase_11 AC 130 ms
54,196 KB
testcase_12 AC 137 ms
54,216 KB
testcase_13 AC 132 ms
53,724 KB
testcase_14 AC 131 ms
53,996 KB
testcase_15 AC 132 ms
54,076 KB
testcase_16 AC 134 ms
54,248 KB
testcase_17 AC 133 ms
54,244 KB
testcase_18 AC 131 ms
53,892 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 135 ms
54,104 KB
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 AC 132 ms
54,088 KB
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 AC 135 ms
54,200 KB
testcase_34 AC 131 ms
54,144 KB
testcase_35 AC 135 ms
54,176 KB
権限があれば一括ダウンロードができます

ソースコード

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