結果

問題 No.1285 ゴミ捨て
ユーザー Konton7Konton7
提出日時 2020-11-14 04:17:11
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 228 ms / 2,000 ms
コード長 170 bytes
コンパイル時間 140 ms
コンパイル使用メモリ 10,728 KB
実行使用メモリ 12,816 KB
最終ジャッジ日時 2023-08-19 07:20:59
合計ジャッジ時間 3,515 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 14 ms
7,832 KB
testcase_01 AC 14 ms
7,832 KB
testcase_02 AC 14 ms
7,820 KB
testcase_03 AC 14 ms
7,828 KB
testcase_04 AC 14 ms
7,796 KB
testcase_05 AC 14 ms
7,752 KB
testcase_06 AC 14 ms
7,864 KB
testcase_07 AC 228 ms
12,708 KB
testcase_08 AC 22 ms
8,224 KB
testcase_09 AC 96 ms
10,020 KB
testcase_10 AC 191 ms
12,404 KB
testcase_11 AC 176 ms
11,932 KB
testcase_12 AC 131 ms
11,152 KB
testcase_13 AC 134 ms
11,140 KB
testcase_14 AC 208 ms
12,592 KB
testcase_15 AC 153 ms
11,600 KB
testcase_16 AC 53 ms
9,132 KB
testcase_17 AC 50 ms
9,084 KB
testcase_18 AC 48 ms
9,032 KB
testcase_19 AC 90 ms
9,764 KB
testcase_20 AC 45 ms
8,812 KB
testcase_21 AC 62 ms
9,360 KB
testcase_22 AC 222 ms
12,816 KB
testcase_23 AC 228 ms
12,804 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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