結果

問題 No.1285 ゴミ捨て
ユーザー gmm_teagmm_tea
提出日時 2020-11-22 00:48:11
言語 Ruby
(3.3.0)
結果
AC  
実行時間 137 ms / 2,000 ms
コード長 133 bytes
コンパイル時間 132 ms
コンパイル使用メモリ 11,300 KB
実行使用メモリ 17,256 KB
最終ジャッジ日時 2023-08-19 07:25:45
合計ジャッジ時間 3,589 ms
ジャッジサーバーID
(参考情報)
judge11 / judge9
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
15,116 KB
testcase_01 AC 71 ms
15,092 KB
testcase_02 AC 71 ms
15,128 KB
testcase_03 AC 72 ms
15,308 KB
testcase_04 AC 75 ms
15,092 KB
testcase_05 AC 73 ms
15,084 KB
testcase_06 AC 70 ms
15,140 KB
testcase_07 AC 129 ms
17,256 KB
testcase_08 AC 73 ms
15,156 KB
testcase_09 AC 101 ms
16,064 KB
testcase_10 AC 124 ms
16,640 KB
testcase_11 AC 120 ms
16,716 KB
testcase_12 AC 110 ms
16,260 KB
testcase_13 AC 111 ms
16,320 KB
testcase_14 AC 133 ms
16,924 KB
testcase_15 AC 118 ms
16,584 KB
testcase_16 AC 84 ms
15,680 KB
testcase_17 AC 84 ms
15,572 KB
testcase_18 AC 82 ms
15,260 KB
testcase_19 AC 94 ms
15,968 KB
testcase_20 AC 82 ms
15,544 KB
testcase_21 AC 88 ms
15,652 KB
testcase_22 AC 137 ms
17,124 KB
testcase_23 AC 135 ms
17,208 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n=gets.to_i
a=[]
n.times do
  a << gets.to_i
end
a.sort!
(n-1).times do |i|
  if a[i+1]-a[i]==1
    puts 2
    exit
  end
end
puts 1
0