結果

問題 No.138 化石のバージョン
ユーザー @abcde@abcde
提出日時 2019-02-08 00:37:57
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 311 bytes
コンパイル時間 336 ms
コンパイル使用メモリ 11,460 KB
実行使用メモリ 15,448 KB
最終ジャッジ日時 2023-09-08 15:40:45
合計ジャッジ時間 5,055 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 81 ms
15,140 KB
testcase_01 AC 82 ms
15,292 KB
testcase_02 AC 83 ms
15,212 KB
testcase_03 AC 80 ms
15,252 KB
testcase_04 AC 80 ms
15,320 KB
testcase_05 AC 81 ms
15,252 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 81 ms
15,164 KB
testcase_17 AC 81 ms
15,076 KB
testcase_18 AC 82 ms
15,108 KB
testcase_19 AC 81 ms
15,024 KB
testcase_20 AC 82 ms
15,244 KB
testcase_21 AC 80 ms
15,300 KB
testcase_22 AC 80 ms
15,256 KB
testcase_23 AC 80 ms
15,084 KB
testcase_24 AC 81 ms
15,036 KB
testcase_25 AC 81 ms
15,016 KB
testcase_26 WA -
testcase_27 AC 81 ms
15,080 KB
testcase_28 AC 82 ms
15,256 KB
testcase_29 AC 80 ms
15,024 KB
testcase_30 AC 81 ms
15,076 KB
testcase_31 AC 83 ms
15,140 KB
testcase_32 AC 82 ms
15,004 KB
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

# 1. 入力.
A0, B0, C0 = gets.split(".").map(&:to_i)
A1, B1, C1 = gets.split(".").map(&:to_i)

# 2. 化石のバージョン判定.
flag = (A0 > A1) ? 0 : 1
flag = ((A0 == A1) && (B0 > B1)) ? 0 : 1
flag = ((A0 == A1) && (B0 == B1) && (C0 >= C1)) ? 0 : 1

# 3. 出力.
ans = (flag == 0) ? "YES" : "NO"
print ans
0