結果

問題 No.998 Four Integers
ユーザー gemmarogemmaro
提出日時 2020-02-28 21:24:47
言語 Ruby
(3.2.2)
結果
AC  
実行時間 70 ms / 1,000 ms
コード長 216 bytes
コンパイル時間 43 ms
コンパイル使用メモリ 11,540 KB
実行使用メモリ 15,352 KB
最終ジャッジ日時 2023-08-20 19:05:36
合計ジャッジ時間 3,244 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
15,032 KB
testcase_01 AC 67 ms
15,136 KB
testcase_02 AC 67 ms
15,092 KB
testcase_03 AC 67 ms
15,116 KB
testcase_04 AC 67 ms
15,168 KB
testcase_05 AC 67 ms
15,028 KB
testcase_06 AC 66 ms
15,208 KB
testcase_07 AC 65 ms
15,164 KB
testcase_08 AC 67 ms
15,320 KB
testcase_09 AC 66 ms
15,160 KB
testcase_10 AC 66 ms
15,148 KB
testcase_11 AC 67 ms
15,088 KB
testcase_12 AC 66 ms
15,136 KB
testcase_13 AC 69 ms
15,296 KB
testcase_14 AC 70 ms
15,252 KB
testcase_15 AC 67 ms
15,164 KB
testcase_16 AC 66 ms
15,164 KB
testcase_17 AC 66 ms
15,168 KB
testcase_18 AC 67 ms
15,168 KB
testcase_19 AC 66 ms
15,116 KB
testcase_20 AC 66 ms
15,196 KB
testcase_21 AC 66 ms
15,352 KB
testcase_22 AC 66 ms
15,244 KB
testcase_23 AC 67 ms
15,052 KB
testcase_24 AC 66 ms
15,168 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

# frozen_string_literal: true

NUMS = gets.chomp.split.map(&:to_i).sort

puts(if NUMS[0] + 1 == NUMS[1] &&
        NUMS[1] + 1 == NUMS[2] &&
        NUMS[2] + 1 == NUMS[3]
       'Yes'
     else
       'No'
     end)
0