結果

問題 No.1285 ゴミ捨て
ユーザー HAGI_TAROHAGI_TARO
提出日時 2021-10-05 08:01:21
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 147 ms / 2,000 ms
コード長 158 bytes
コンパイル時間 309 ms
コンパイル使用メモリ 87,120 KB
実行使用メモリ 79,436 KB
最終ジャッジ日時 2023-09-30 08:27:46
合計ジャッジ時間 4,091 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,160 KB
testcase_01 AC 73 ms
71,436 KB
testcase_02 AC 73 ms
71,376 KB
testcase_03 AC 73 ms
71,380 KB
testcase_04 AC 73 ms
71,300 KB
testcase_05 AC 73 ms
71,348 KB
testcase_06 AC 75 ms
71,240 KB
testcase_07 AC 141 ms
79,060 KB
testcase_08 AC 96 ms
76,544 KB
testcase_09 AC 117 ms
77,980 KB
testcase_10 AC 142 ms
79,080 KB
testcase_11 AC 135 ms
79,276 KB
testcase_12 AC 124 ms
78,408 KB
testcase_13 AC 122 ms
78,428 KB
testcase_14 AC 140 ms
79,284 KB
testcase_15 AC 128 ms
78,408 KB
testcase_16 AC 105 ms
77,412 KB
testcase_17 AC 106 ms
77,652 KB
testcase_18 AC 104 ms
77,496 KB
testcase_19 AC 116 ms
77,928 KB
testcase_20 AC 105 ms
77,384 KB
testcase_21 AC 109 ms
77,676 KB
testcase_22 AC 147 ms
79,180 KB
testcase_23 AC 146 ms
79,436 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
A = sorted([int(input()) for _ in range(n)])
ans = 1
for i in range(n-1):
    if A[i] + 1 == A[i+1]:
        ans = 2
        break
print(ans)
0