結果

問題 No.1285 ゴミ捨て
ユーザー miya145592miya145592
提出日時 2023-05-12 00:52:26
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 130 ms / 2,000 ms
コード長 147 bytes
コンパイル時間 1,348 ms
コンパイル使用メモリ 87,108 KB
実行使用メモリ 78,828 KB
最終ジャッジ日時 2023-08-18 14:26:40
合計ジャッジ時間 5,246 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 65 ms
71,432 KB
testcase_01 AC 64 ms
71,340 KB
testcase_02 AC 68 ms
71,468 KB
testcase_03 AC 70 ms
70,984 KB
testcase_04 AC 66 ms
71,180 KB
testcase_05 AC 65 ms
71,512 KB
testcase_06 AC 64 ms
71,340 KB
testcase_07 AC 125 ms
78,424 KB
testcase_08 AC 84 ms
76,788 KB
testcase_09 AC 101 ms
77,840 KB
testcase_10 AC 120 ms
78,532 KB
testcase_11 AC 116 ms
78,560 KB
testcase_12 AC 108 ms
77,856 KB
testcase_13 AC 106 ms
77,864 KB
testcase_14 AC 130 ms
78,636 KB
testcase_15 AC 110 ms
77,908 KB
testcase_16 AC 92 ms
77,156 KB
testcase_17 AC 94 ms
77,284 KB
testcase_18 AC 90 ms
77,344 KB
testcase_19 AC 98 ms
77,336 KB
testcase_20 AC 91 ms
77,556 KB
testcase_21 AC 92 ms
77,516 KB
testcase_22 AC 127 ms
78,572 KB
testcase_23 AC 130 ms
78,828 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = [int(input()) for _ in range(N)]
A.sort()
for i in range(N-1):
    if A[i+1]-A[i]==1:
        print(2)
        exit()
print(1)
0