結果

問題 No.1686 Geschenkt
ユーザー maimai
提出日時 2021-09-24 21:22:26
言語 Ruby
(3.3.0)
結果
AC  
実行時間 84 ms / 2,000 ms
コード長 122 bytes
コンパイル時間 143 ms
コンパイル使用メモリ 11,508 KB
実行使用メモリ 15,356 KB
最終ジャッジ日時 2023-09-18 20:32:14
合計ジャッジ時間 1,566 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 83 ms
15,116 KB
testcase_01 AC 80 ms
15,004 KB
testcase_02 AC 82 ms
15,316 KB
testcase_03 AC 81 ms
15,172 KB
testcase_04 AC 84 ms
15,316 KB
testcase_05 AC 84 ms
15,000 KB
testcase_06 AC 83 ms
15,200 KB
testcase_07 AC 83 ms
15,008 KB
testcase_08 AC 84 ms
15,164 KB
testcase_09 AC 83 ms
15,356 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

def lscan; gets.split.map(&:to_i); end
gets
p ([-2]+lscan).sort.each_cons(2).filter{|a,b| b-a > 1}.map{|a,b| b}.reduce(:+)
0