結果

問題 No.1285 ゴミ捨て
ユーザー NoneNone
提出日時 2021-05-05 03:00:43
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 139 ms / 2,000 ms
コード長 223 bytes
コンパイル時間 171 ms
コンパイル使用メモリ 82,424 KB
実行使用メモリ 88,504 KB
最終ジャッジ日時 2024-05-06 14:45:41
合計ジャッジ時間 3,239 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
53,504 KB
testcase_01 AC 43 ms
53,248 KB
testcase_02 AC 43 ms
54,016 KB
testcase_03 AC 42 ms
53,760 KB
testcase_04 AC 40 ms
53,504 KB
testcase_05 AC 41 ms
54,016 KB
testcase_06 AC 40 ms
53,760 KB
testcase_07 AC 138 ms
86,456 KB
testcase_08 AC 68 ms
70,656 KB
testcase_09 AC 104 ms
84,096 KB
testcase_10 AC 126 ms
88,116 KB
testcase_11 AC 124 ms
86,800 KB
testcase_12 AC 113 ms
83,612 KB
testcase_13 AC 112 ms
83,356 KB
testcase_14 AC 135 ms
88,504 KB
testcase_15 AC 119 ms
85,044 KB
testcase_16 AC 84 ms
78,464 KB
testcase_17 AC 85 ms
78,464 KB
testcase_18 AC 83 ms
78,080 KB
testcase_19 AC 100 ms
83,072 KB
testcase_20 AC 83 ms
77,824 KB
testcase_21 AC 87 ms
80,232 KB
testcase_22 AC 139 ms
87,468 KB
testcase_23 AC 139 ms
87,476 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import Counter
N=int(input())
A=[]
for _ in range(N):
    A.append(int(input()))
A.sort()
D=[]
for i in range(1,N):
    D.append(A[i]-A[i-1])
C=Counter(D)
if C[1]==0:
    print(1)
elif C[1]>=1:
    print(2)
0