結果
| 問題 |
No.138 化石のバージョン
|
| コンテスト | |
| ユーザー |
Tsukasa_Type
|
| 提出日時 | 2018-02-09 18:31:58 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 581 bytes |
| コンパイル時間 | 4,370 ms |
| コンパイル使用メモリ | 74,912 KB |
| 実行使用メモリ | 56,376 KB |
| 最終ジャッジ日時 | 2024-10-07 21:38:38 |
| 合計ジャッジ時間 | 7,459 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 19 WA * 14 |
ソースコード
import java.util.*;
public class Main {
static Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
String[] a = sc.nextLine().split("\\.");
String[] b = sc.nextLine().split("\\.");
int[] x = new int[3];
int[] y = new int[3];
for (int i=0; i<3; i++) {
x[i] = Integer.parseInt(a[i]);
y[i] = Integer.parseInt(b[i]);
}
boolean isOld = true;
if (y[0] > x[0]) {isOld = false;}
else {
if (y[1] > x[1]) {isOld = false;}
else {
if (y[2] > x[2]) {isOld = false;}
}
}
System.out.println(isOld==true?"YES":"NO");
}
}
Tsukasa_Type