結果

問題 No.1285 ゴミ捨て
ユーザー 👑 timitimi
提出日時 2020-11-16 12:54:52
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 286 ms / 2,000 ms
コード長 140 bytes
コンパイル時間 422 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 15,956 KB
最終ジャッジ日時 2024-05-06 14:38:10
合計ジャッジ時間 4,418 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
10,624 KB
testcase_01 AC 30 ms
10,624 KB
testcase_02 AC 30 ms
10,752 KB
testcase_03 AC 31 ms
10,624 KB
testcase_04 AC 30 ms
10,624 KB
testcase_05 AC 32 ms
10,624 KB
testcase_06 AC 31 ms
10,624 KB
testcase_07 AC 271 ms
15,616 KB
testcase_08 AC 39 ms
10,880 KB
testcase_09 AC 131 ms
12,928 KB
testcase_10 AC 233 ms
15,104 KB
testcase_11 AC 228 ms
14,720 KB
testcase_12 AC 170 ms
13,568 KB
testcase_13 AC 167 ms
13,696 KB
testcase_14 AC 258 ms
15,488 KB
testcase_15 AC 196 ms
14,080 KB
testcase_16 AC 77 ms
11,520 KB
testcase_17 AC 81 ms
11,648 KB
testcase_18 AC 74 ms
11,648 KB
testcase_19 AC 126 ms
12,672 KB
testcase_20 AC 71 ms
11,392 KB
testcase_21 AC 85 ms
11,904 KB
testcase_22 AC 272 ms
15,828 KB
testcase_23 AC 286 ms
15,956 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
A=[int(input()) for i in range(N)]
A=sorted(A)
d=0
for i in range(N-1):
  if A[i]+1==A[i+1]:
    print(2)
    exit()
print(1)
0