結果

問題 No.1285 ゴミ捨て
ユーザー terrafarmterrafarm
提出日時 2020-11-22 19:25:06
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 196 ms / 2,000 ms
コード長 166 bytes
コンパイル時間 102 ms
コンパイル使用メモリ 10,656 KB
実行使用メモリ 12,384 KB
最終ジャッジ日時 2023-08-19 07:25:39
合計ジャッジ時間 3,153 ms
ジャッジサーバーID
(参考情報)
judge10 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 13 ms
8,092 KB
testcase_01 AC 13 ms
7,748 KB
testcase_02 AC 13 ms
7,884 KB
testcase_03 AC 15 ms
7,744 KB
testcase_04 AC 14 ms
7,744 KB
testcase_05 AC 14 ms
7,920 KB
testcase_06 AC 14 ms
7,820 KB
testcase_07 AC 186 ms
12,204 KB
testcase_08 AC 23 ms
8,388 KB
testcase_09 AC 96 ms
9,996 KB
testcase_10 AC 169 ms
11,872 KB
testcase_11 AC 160 ms
11,476 KB
testcase_12 AC 118 ms
10,400 KB
testcase_13 AC 117 ms
10,464 KB
testcase_14 AC 169 ms
12,140 KB
testcase_15 AC 133 ms
10,732 KB
testcase_16 AC 46 ms
8,824 KB
testcase_17 AC 46 ms
9,012 KB
testcase_18 AC 44 ms
8,896 KB
testcase_19 AC 79 ms
9,632 KB
testcase_20 AC 41 ms
8,720 KB
testcase_21 AC 53 ms
9,112 KB
testcase_22 AC 196 ms
12,364 KB
testcase_23 AC 185 ms
12,384 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()
else:
    print(1)
0