結果

問題 No.1285 ゴミ捨て
ユーザー NoneNone
提出日時 2021-05-05 03:00:43
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 169 ms / 2,000 ms
コード長 223 bytes
コンパイル時間 229 ms
コンパイル使用メモリ 87,252 KB
実行使用メモリ 90,520 KB
最終ジャッジ日時 2023-08-19 07:30:59
合計ジャッジ時間 4,188 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
71,484 KB
testcase_01 AC 77 ms
71,568 KB
testcase_02 AC 78 ms
71,388 KB
testcase_03 AC 79 ms
71,652 KB
testcase_04 AC 82 ms
71,744 KB
testcase_05 AC 83 ms
71,792 KB
testcase_06 AC 84 ms
71,668 KB
testcase_07 AC 169 ms
90,212 KB
testcase_08 AC 103 ms
77,860 KB
testcase_09 AC 130 ms
84,496 KB
testcase_10 AC 155 ms
88,672 KB
testcase_11 AC 146 ms
87,420 KB
testcase_12 AC 133 ms
86,340 KB
testcase_13 AC 136 ms
86,628 KB
testcase_14 AC 153 ms
88,852 KB
testcase_15 AC 136 ms
86,376 KB
testcase_16 AC 110 ms
79,848 KB
testcase_17 AC 109 ms
79,804 KB
testcase_18 AC 111 ms
79,764 KB
testcase_19 AC 124 ms
83,628 KB
testcase_20 AC 111 ms
79,104 KB
testcase_21 AC 113 ms
80,560 KB
testcase_22 AC 165 ms
90,340 KB
testcase_23 AC 167 ms
90,520 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