結果

問題 No.1285 ゴミ捨て
ユーザー raven7959raven7959
提出日時 2021-08-03 22:16:36
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 142 ms / 2,000 ms
コード長 224 bytes
コンパイル時間 1,078 ms
コンパイル使用メモリ 87,252 KB
実行使用メモリ 79,348 KB
最終ジャッジ日時 2023-08-19 07:31:21
合計ジャッジ時間 4,474 ms
ジャッジサーバーID
(参考情報)
judge10 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,364 KB
testcase_01 AC 69 ms
70,928 KB
testcase_02 AC 70 ms
71,220 KB
testcase_03 AC 70 ms
71,116 KB
testcase_04 AC 69 ms
71,060 KB
testcase_05 AC 70 ms
71,304 KB
testcase_06 AC 70 ms
71,068 KB
testcase_07 AC 138 ms
79,068 KB
testcase_08 AC 92 ms
76,604 KB
testcase_09 AC 111 ms
77,872 KB
testcase_10 AC 132 ms
78,916 KB
testcase_11 AC 129 ms
78,652 KB
testcase_12 AC 118 ms
78,244 KB
testcase_13 AC 119 ms
78,208 KB
testcase_14 AC 136 ms
79,044 KB
testcase_15 AC 122 ms
78,300 KB
testcase_16 AC 101 ms
77,492 KB
testcase_17 AC 100 ms
77,412 KB
testcase_18 AC 98 ms
76,988 KB
testcase_19 AC 109 ms
77,880 KB
testcase_20 AC 99 ms
77,380 KB
testcase_21 AC 101 ms
77,648 KB
testcase_22 AC 142 ms
79,348 KB
testcase_23 AC 141 ms
79,080 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
if N==1:
    print(1)
else:
    A=[0]*N
    for i in range(N):
        A[i]=int(input())
    A=sorted(A)
    for i in range(N-1):
        if A[i+1]-A[i]==1:
            print(2)
            exit()
    print(1)
0