結果

問題 No.1285 ゴミ捨て
ユーザー MineMine
提出日時 2021-01-28 19:43:05
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 212 ms / 2,000 ms
コード長 152 bytes
コンパイル時間 284 ms
コンパイル使用メモリ 10,480 KB
実行使用メモリ 12,352 KB
最終ジャッジ日時 2023-08-19 07:29:23
合計ジャッジ時間 3,632 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
8,064 KB
testcase_01 AC 15 ms
7,852 KB
testcase_02 AC 16 ms
7,836 KB
testcase_03 AC 15 ms
7,800 KB
testcase_04 AC 16 ms
7,768 KB
testcase_05 AC 15 ms
7,852 KB
testcase_06 AC 15 ms
7,928 KB
testcase_07 AC 201 ms
12,352 KB
testcase_08 AC 23 ms
8,320 KB
testcase_09 AC 95 ms
9,824 KB
testcase_10 AC 179 ms
11,720 KB
testcase_11 AC 171 ms
11,436 KB
testcase_12 AC 128 ms
10,480 KB
testcase_13 AC 126 ms
10,476 KB
testcase_14 AC 194 ms
11,968 KB
testcase_15 AC 148 ms
10,824 KB
testcase_16 AC 54 ms
8,816 KB
testcase_17 AC 55 ms
8,912 KB
testcase_18 AC 51 ms
8,828 KB
testcase_19 AC 91 ms
9,752 KB
testcase_20 AC 48 ms
8,784 KB
testcase_21 AC 59 ms
9,064 KB
testcase_22 AC 212 ms
12,352 KB
testcase_23 AC 210 ms
12,328 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