結果

問題 No.1285 ゴミ捨て
ユーザー marroncastlemarroncastle
提出日時 2020-11-13 21:55:44
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 144 ms / 2,000 ms
コード長 145 bytes
コンパイル時間 889 ms
コンパイル使用メモリ 87,080 KB
実行使用メモリ 78,424 KB
最終ジャッジ日時 2023-08-19 07:17:21
合計ジャッジ時間 4,782 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,388 KB
testcase_01 AC 74 ms
71,088 KB
testcase_02 AC 73 ms
71,432 KB
testcase_03 AC 74 ms
71,240 KB
testcase_04 AC 75 ms
71,292 KB
testcase_05 AC 74 ms
71,452 KB
testcase_06 AC 77 ms
71,288 KB
testcase_07 AC 143 ms
78,364 KB
testcase_08 AC 96 ms
76,644 KB
testcase_09 AC 116 ms
77,280 KB
testcase_10 AC 137 ms
78,300 KB
testcase_11 AC 134 ms
78,400 KB
testcase_12 AC 123 ms
77,932 KB
testcase_13 AC 125 ms
77,700 KB
testcase_14 AC 141 ms
78,424 KB
testcase_15 AC 128 ms
77,920 KB
testcase_16 AC 105 ms
77,116 KB
testcase_17 AC 103 ms
77,272 KB
testcase_18 AC 105 ms
77,104 KB
testcase_19 AC 117 ms
77,684 KB
testcase_20 AC 104 ms
77,208 KB
testcase_21 AC 108 ms
77,336 KB
testcase_22 AC 144 ms
78,180 KB
testcase_23 AC 144 ms
78,344 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = [int(input()) for _ in range(N)]
A.sort()
ans = 1
for i in range(N-1):
  if A[i]+1==A[i+1]:
    ans = 2
    break
print(ans)
0