結果

問題 No.1285 ゴミ捨て
ユーザー NatsubiSoganNatsubiSogan
提出日時 2020-11-13 21:55:53
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 213 ms / 2,000 ms
コード長 144 bytes
コンパイル時間 730 ms
コンパイル使用メモリ 10,696 KB
実行使用メモリ 12,452 KB
最終ジャッジ日時 2023-08-19 07:16:29
合計ジャッジ時間 3,763 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,916 KB
testcase_01 AC 15 ms
7,808 KB
testcase_02 AC 16 ms
7,776 KB
testcase_03 AC 16 ms
7,868 KB
testcase_04 AC 15 ms
7,824 KB
testcase_05 AC 15 ms
7,868 KB
testcase_06 AC 15 ms
7,868 KB
testcase_07 AC 203 ms
12,352 KB
testcase_08 AC 22 ms
7,752 KB
testcase_09 AC 97 ms
9,928 KB
testcase_10 AC 179 ms
11,736 KB
testcase_11 AC 172 ms
11,440 KB
testcase_12 AC 126 ms
10,332 KB
testcase_13 AC 127 ms
10,388 KB
testcase_14 AC 194 ms
12,148 KB
testcase_15 AC 147 ms
10,680 KB
testcase_16 AC 52 ms
8,932 KB
testcase_17 AC 54 ms
8,900 KB
testcase_18 AC 51 ms
8,676 KB
testcase_19 AC 90 ms
9,788 KB
testcase_20 AC 47 ms
8,820 KB
testcase_21 AC 60 ms
8,952 KB
testcase_22 AC 213 ms
12,444 KB
testcase_23 AC 212 ms
12,452 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a = [int(input()) for i in range(n)]
a.sort()
if all(a[i - 1] + 1 < a[i] for i in range(1, n)):
    print(1)
else:
    print(2)
0