結果

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

テストケース

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

ソースコード

diff #

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

def hakake(nums)
  ret = 1
  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