結果

問題 No.1285 ゴミ捨て
ユーザー y10y10
提出日時 2020-11-13 21:37:33
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 232 ms / 2,000 ms
コード長 177 bytes
コンパイル時間 427 ms
コンパイル使用メモリ 10,656 KB
実行使用メモリ 13,268 KB
最終ジャッジ日時 2023-08-19 07:15:26
合計ジャッジ時間 3,867 ms
ジャッジサーバーID
(参考情報)
judge9 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,948 KB
testcase_01 AC 14 ms
7,972 KB
testcase_02 AC 14 ms
7,868 KB
testcase_03 AC 14 ms
7,776 KB
testcase_04 AC 13 ms
7,840 KB
testcase_05 AC 14 ms
7,864 KB
testcase_06 AC 15 ms
7,816 KB
testcase_07 AC 213 ms
13,012 KB
testcase_08 AC 22 ms
8,276 KB
testcase_09 AC 96 ms
10,104 KB
testcase_10 AC 184 ms
12,384 KB
testcase_11 AC 171 ms
12,116 KB
testcase_12 AC 126 ms
10,964 KB
testcase_13 AC 127 ms
11,032 KB
testcase_14 AC 195 ms
12,752 KB
testcase_15 AC 146 ms
11,380 KB
testcase_16 AC 48 ms
8,948 KB
testcase_17 AC 50 ms
9,076 KB
testcase_18 AC 46 ms
8,976 KB
testcase_19 AC 88 ms
9,992 KB
testcase_20 AC 46 ms
8,708 KB
testcase_21 AC 64 ms
9,260 KB
testcase_22 AC 232 ms
13,220 KB
testcase_23 AC 232 ms
13,268 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

flag = 0
for i in range(n-1):
    if a[i+1] - a[i] <= 1:
        flag = 1
if flag:
    print(2)
else:
    print(1)
0