結果

問題 No.481 1から10
ユーザー naotest2naotest2
提出日時 2017-05-22 16:21:50
言語 Ruby
(3.3.0)
結果
RE  
実行時間 -
コード長 229 bytes
コンパイル時間 450 ms
コンパイル使用メモリ 11,892 KB
実行使用メモリ 16,248 KB
最終ジャッジ日時 2023-10-19 13:39:55
合計ジャッジ時間 1,658 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 89 ms
16,064 KB
testcase_01 AC 90 ms
16,064 KB
testcase_02 AC 87 ms
16,064 KB
testcase_03 AC 88 ms
16,064 KB
testcase_04 RE -
testcase_05 AC 86 ms
16,068 KB
testcase_06 AC 86 ms
16,068 KB
testcase_07 AC 89 ms
16,068 KB
testcase_08 AC 89 ms
16,068 KB
testcase_09 RE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

numbers=gets.chomp.split.map {|x| x.to_i}

def hakake(nums)
  ret = nil
  for x in 0..nums.length
    if x > 0 and nums[x] != nums[x-1] + 1
      ret = nums[x] - 1
      break
    end
  end
  return ret
end

puts hakake(numbers)
0