結果

問題 No.1285 ゴミ捨て
ユーザー DrDrpilotDrDrpilot
提出日時 2022-01-20 16:18:35
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 274 ms / 2,000 ms
コード長 193 bytes
コンパイル時間 153 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 15,180 KB
最終ジャッジ日時 2024-05-03 01:36:41
合計ジャッジ時間 4,027 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 28 ms
10,624 KB
testcase_01 AC 29 ms
10,496 KB
testcase_02 AC 30 ms
10,624 KB
testcase_03 AC 30 ms
10,624 KB
testcase_04 AC 30 ms
10,496 KB
testcase_05 AC 29 ms
10,624 KB
testcase_06 AC 29 ms
10,624 KB
testcase_07 AC 256 ms
14,848 KB
testcase_08 AC 38 ms
10,880 KB
testcase_09 AC 127 ms
12,416 KB
testcase_10 AC 227 ms
14,336 KB
testcase_11 AC 214 ms
13,952 KB
testcase_12 AC 170 ms
13,184 KB
testcase_13 AC 162 ms
13,184 KB
testcase_14 AC 246 ms
14,568 KB
testcase_15 AC 190 ms
13,568 KB
testcase_16 AC 78 ms
11,392 KB
testcase_17 AC 78 ms
11,520 KB
testcase_18 AC 73 ms
11,392 KB
testcase_19 AC 123 ms
12,416 KB
testcase_20 AC 70 ms
11,264 KB
testcase_21 AC 86 ms
11,776 KB
testcase_22 AC 271 ms
15,180 KB
testcase_23 AC 274 ms
15,048 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
a=[int(input()) for _ in range(n)]
a.sort()
now=a[0]
f=True
for i in range(1,n):
    if now+1<a[i]:
        now=a[i]
    else:
        f=False
        break
print(1 if f else 2)
0