結果

問題 No.1285 ゴミ捨て
ユーザー ああいいああいい
提出日時 2021-12-23 20:54:49
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 238 ms / 2,000 ms
コード長 160 bytes
コンパイル時間 117 ms
コンパイル使用メモリ 11,680 KB
実行使用メモリ 14,292 KB
最終ジャッジ日時 2023-10-17 22:32:31
合計ジャッジ時間 4,906 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
10,012 KB
testcase_01 AC 30 ms
10,012 KB
testcase_02 AC 30 ms
10,012 KB
testcase_03 AC 29 ms
10,012 KB
testcase_04 AC 29 ms
10,012 KB
testcase_05 AC 29 ms
10,012 KB
testcase_06 AC 30 ms
10,016 KB
testcase_07 AC 231 ms
14,120 KB
testcase_08 AC 36 ms
10,164 KB
testcase_09 AC 116 ms
11,732 KB
testcase_10 AC 201 ms
13,636 KB
testcase_11 AC 194 ms
13,364 KB
testcase_12 AC 149 ms
12,312 KB
testcase_13 AC 145 ms
12,308 KB
testcase_14 AC 220 ms
13,932 KB
testcase_15 AC 170 ms
12,648 KB
testcase_16 AC 68 ms
10,772 KB
testcase_17 AC 69 ms
10,796 KB
testcase_18 AC 65 ms
10,640 KB
testcase_19 AC 107 ms
11,708 KB
testcase_20 AC 63 ms
10,640 KB
testcase_21 AC 76 ms
10,944 KB
testcase_22 AC 235 ms
14,292 KB
testcase_23 AC 238 ms
14,292 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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