結果

問題 No.1285 ゴミ捨て
ユーザー kento_kunkento_kun
提出日時 2020-11-23 21:44:31
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 214 bytes
コンパイル時間 268 ms
コンパイル使用メモリ 86,828 KB
実行使用メモリ 81,348 KB
最終ジャッジ日時 2023-10-01 00:10:50
合計ジャッジ時間 4,236 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
70,920 KB
testcase_01 AC 68 ms
70,668 KB
testcase_02 AC 71 ms
71,104 KB
testcase_03 AC 74 ms
70,856 KB
testcase_04 AC 72 ms
70,936 KB
testcase_05 AC 71 ms
71,124 KB
testcase_06 AC 70 ms
70,952 KB
testcase_07 WA -
testcase_08 AC 94 ms
76,728 KB
testcase_09 AC 116 ms
79,328 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 103 ms
77,240 KB
testcase_17 AC 102 ms
77,244 KB
testcase_18 AC 101 ms
77,096 KB
testcase_19 WA -
testcase_20 AC 100 ms
77,016 KB
testcase_21 AC 104 ms
77,544 KB
testcase_22 WA -
testcase_23 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
Alist = []
for _ in range(N):
    a = int(input())
    Alist.append(a)

Alist.sort()

a = Alist[0]
cnt = 1
for i in range(1, N):
    if Alist[i] == a+1:
        cnt += 1
    a = Alist[i]
print(cnt)
0