結果

問題 No.1285 ゴミ捨て
ユーザー kikagekikage
提出日時 2021-08-14 23:54:08
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 240 ms / 2,000 ms
コード長 144 bytes
コンパイル時間 358 ms
コンパイル使用メモリ 10,680 KB
実行使用メモリ 12,460 KB
最終ジャッジ日時 2023-08-19 07:31:16
合計ジャッジ時間 3,829 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,900 KB
testcase_01 AC 15 ms
7,784 KB
testcase_02 AC 16 ms
7,800 KB
testcase_03 AC 16 ms
7,856 KB
testcase_04 AC 16 ms
7,804 KB
testcase_05 AC 15 ms
7,856 KB
testcase_06 AC 15 ms
7,836 KB
testcase_07 AC 229 ms
12,212 KB
testcase_08 AC 22 ms
8,240 KB
testcase_09 AC 106 ms
9,952 KB
testcase_10 AC 200 ms
11,720 KB
testcase_11 AC 180 ms
11,564 KB
testcase_12 AC 135 ms
10,472 KB
testcase_13 AC 137 ms
10,448 KB
testcase_14 AC 214 ms
12,040 KB
testcase_15 AC 156 ms
10,684 KB
testcase_16 AC 54 ms
8,832 KB
testcase_17 AC 54 ms
8,996 KB
testcase_18 AC 52 ms
8,824 KB
testcase_19 AC 95 ms
9,892 KB
testcase_20 AC 49 ms
8,752 KB
testcase_21 AC 64 ms
9,148 KB
testcase_22 AC 237 ms
12,460 KB
testcase_23 AC 240 ms
12,444 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
A=[int(input()) for i in range(N)]
A.sort()
TWO=False
for i in range(N-1):
    if A[i]+1==A[i+1]:TWO=True

print(2 if TWO else 1)
0