結果

問題 No.1285 ゴミ捨て
ユーザー ttrttr
提出日時 2020-11-13 21:23:12
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 211 ms / 2,000 ms
コード長 158 bytes
コンパイル時間 374 ms
コンパイル使用メモリ 10,540 KB
実行使用メモリ 12,464 KB
最終ジャッジ日時 2023-08-19 07:09:09
合計ジャッジ時間 3,586 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,940 KB
testcase_01 AC 16 ms
7,824 KB
testcase_02 AC 16 ms
7,780 KB
testcase_03 AC 16 ms
7,824 KB
testcase_04 AC 16 ms
7,872 KB
testcase_05 AC 16 ms
7,872 KB
testcase_06 AC 16 ms
7,824 KB
testcase_07 AC 203 ms
12,160 KB
testcase_08 AC 23 ms
8,248 KB
testcase_09 AC 96 ms
9,892 KB
testcase_10 AC 184 ms
11,816 KB
testcase_11 AC 174 ms
11,464 KB
testcase_12 AC 131 ms
10,424 KB
testcase_13 AC 128 ms
10,492 KB
testcase_14 AC 197 ms
11,992 KB
testcase_15 AC 148 ms
10,812 KB
testcase_16 AC 53 ms
8,964 KB
testcase_17 AC 55 ms
8,864 KB
testcase_18 AC 52 ms
8,668 KB
testcase_19 AC 91 ms
9,948 KB
testcase_20 AC 49 ms
8,776 KB
testcase_21 AC 59 ms
9,036 KB
testcase_22 AC 210 ms
12,464 KB
testcase_23 AC 211 ms
12,428 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