結果

問題 No.1285 ゴミ捨て
ユーザー lloyzlloyz
提出日時 2022-01-29 20:38:24
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 214 ms / 2,000 ms
コード長 166 bytes
コンパイル時間 168 ms
コンパイル使用メモリ 10,660 KB
実行使用メモリ 12,476 KB
最終ジャッジ日時 2023-08-30 20:03:45
合計ジャッジ時間 4,410 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
8,008 KB
testcase_01 AC 15 ms
7,852 KB
testcase_02 AC 15 ms
7,976 KB
testcase_03 AC 14 ms
7,796 KB
testcase_04 AC 15 ms
7,960 KB
testcase_05 AC 15 ms
7,796 KB
testcase_06 AC 15 ms
7,912 KB
testcase_07 AC 202 ms
12,196 KB
testcase_08 AC 21 ms
8,320 KB
testcase_09 AC 94 ms
9,960 KB
testcase_10 AC 178 ms
11,808 KB
testcase_11 AC 166 ms
11,572 KB
testcase_12 AC 129 ms
10,432 KB
testcase_13 AC 127 ms
10,448 KB
testcase_14 AC 190 ms
12,060 KB
testcase_15 AC 146 ms
10,820 KB
testcase_16 AC 53 ms
8,864 KB
testcase_17 AC 54 ms
8,972 KB
testcase_18 AC 50 ms
8,676 KB
testcase_19 AC 89 ms
9,792 KB
testcase_20 AC 48 ms
8,644 KB
testcase_21 AC 59 ms
9,036 KB
testcase_22 AC 208 ms
12,332 KB
testcase_23 AC 214 ms
12,476 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
A = [int(input()) for _ in range(n)]

A.sort()
for i in range(n - 1):
    if A[i] + 1 == A[i + 1]:
        print(2)
        exit()
print(1)
0