結果

問題 No.1285 ゴミ捨て
ユーザー qibqib
提出日時 2022-10-28 21:53:21
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 159 ms / 2,000 ms
コード長 198 bytes
コンパイル時間 345 ms
コンパイル使用メモリ 87,180 KB
実行使用メモリ 79,436 KB
最終ジャッジ日時 2023-09-20 04:48:14
合計ジャッジ時間 4,609 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 85 ms
71,288 KB
testcase_01 AC 87 ms
71,024 KB
testcase_02 AC 88 ms
70,896 KB
testcase_03 AC 83 ms
71,068 KB
testcase_04 AC 83 ms
70,932 KB
testcase_05 AC 87 ms
71,156 KB
testcase_06 AC 87 ms
71,204 KB
testcase_07 AC 159 ms
79,100 KB
testcase_08 AC 114 ms
76,464 KB
testcase_09 AC 135 ms
77,796 KB
testcase_10 AC 155 ms
78,808 KB
testcase_11 AC 148 ms
78,812 KB
testcase_12 AC 135 ms
78,088 KB
testcase_13 AC 133 ms
78,324 KB
testcase_14 AC 149 ms
79,040 KB
testcase_15 AC 134 ms
78,236 KB
testcase_16 AC 112 ms
77,268 KB
testcase_17 AC 114 ms
77,496 KB
testcase_18 AC 113 ms
77,388 KB
testcase_19 AC 123 ms
77,756 KB
testcase_20 AC 113 ms
77,328 KB
testcase_21 AC 115 ms
77,196 KB
testcase_22 AC 157 ms
79,176 KB
testcase_23 AC 155 ms
79,436 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import bisect as bs

n = int(input())

if n == 1:
	print("1")
	exit()

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

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