結果

問題 No.1285 ゴミ捨て
ユーザー gorugo30gorugo30
提出日時 2021-02-25 17:51:46
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 149 bytes
コンパイル時間 186 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 77,100 KB
最終ジャッジ日時 2024-04-08 15:40:40
合計ジャッジ時間 3,605 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,460 KB
testcase_01 AC 37 ms
53,460 KB
testcase_02 AC 38 ms
53,460 KB
testcase_03 AC 36 ms
53,460 KB
testcase_04 AC 37 ms
53,460 KB
testcase_05 AC 37 ms
53,460 KB
testcase_06 AC 37 ms
53,460 KB
testcase_07 WA -
testcase_08 AC 60 ms
68,700 KB
testcase_09 AC 85 ms
76,200 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 70 ms
74,540 KB
testcase_17 AC 72 ms
75,944 KB
testcase_18 AC 69 ms
73,928 KB
testcase_19 WA -
testcase_20 AC 68 ms
73,160 KB
testcase_21 AC 76 ms
75,948 KB
testcase_22 WA -
testcase_23 WA -
権限があれば一括ダウンロードができます

ソースコード

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
print(ans)
0