結果

問題 No.1285 ゴミ捨て
ユーザー gorugo30gorugo30
提出日時 2021-02-25 17:52:44
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 126 ms / 2,000 ms
コード長 182 bytes
コンパイル時間 234 ms
コンパイル使用メモリ 86,952 KB
実行使用メモリ 78,708 KB
最終ジャッジ日時 2023-08-19 07:29:55
合計ジャッジ時間 3,519 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 64 ms
70,936 KB
testcase_01 AC 60 ms
70,928 KB
testcase_02 AC 64 ms
70,932 KB
testcase_03 AC 66 ms
71,128 KB
testcase_04 AC 60 ms
71,092 KB
testcase_05 AC 63 ms
71,096 KB
testcase_06 AC 60 ms
71,236 KB
testcase_07 AC 120 ms
78,372 KB
testcase_08 AC 81 ms
76,728 KB
testcase_09 AC 99 ms
77,676 KB
testcase_10 AC 121 ms
78,144 KB
testcase_11 AC 126 ms
78,388 KB
testcase_12 AC 105 ms
77,724 KB
testcase_13 AC 104 ms
77,724 KB
testcase_14 AC 119 ms
78,460 KB
testcase_15 AC 106 ms
77,888 KB
testcase_16 AC 91 ms
77,140 KB
testcase_17 AC 88 ms
77,272 KB
testcase_18 AC 86 ms
77,396 KB
testcase_19 AC 97 ms
77,548 KB
testcase_20 AC 88 ms
77,144 KB
testcase_21 AC 91 ms
77,400 KB
testcase_22 AC 124 ms
78,564 KB
testcase_23 AC 124 ms
78,708 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

ans = 1
N = int(input())
A = [int(input()) for i in range(N)]
A.sort()
for i in range(1, N):
    if A[i] - A[i - 1] == 1:
        ans += 1
if ans > 1:
    print(2)
else:
    print(1)
0