結果
| 問題 |
No.138 化石のバージョン
|
| コンテスト | |
| ユーザー |
maru
|
| 提出日時 | 2016-03-23 02:54:27 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 751 bytes |
| コンパイル時間 | 3,310 ms |
| コンパイル使用メモリ | 74,376 KB |
| 実行使用メモリ | 54,384 KB |
| 最終ジャッジ日時 | 2024-10-01 19:24:21 |
| 合計ジャッジ時間 | 9,280 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 18 WA * 15 |
ソースコード
import java.util.Scanner;
public class yukicoder_138 {
public static void main(String[] args) {
Scanner stdIn = new Scanner(System.in);
String a = stdIn.nextLine();
String b = stdIn.nextLine();
String[] a_str = a.split("\\.");
String[] b_str = b.split("\\.");
if (a_str[0].compareTo(b_str[0]) == 1) {
System.out.println("YES");
} else if (a_str[0].compareTo(b_str[0]) == 0) {
if (a_str[1].compareTo(b_str[1]) == 1) {
System.out.println("YES");
} else if (a_str[1].compareTo(b_str[1]) == 0) {
if (a_str[2].compareTo(b_str[2]) == 1) {
System.out.println("YES");
} else {
System.out.println("NO");
}
} else {
System.out.println("NO");
}
} else {
System.out.println("NO");
}
}
}
maru