結果

問題 No.1285 ゴミ捨て
ユーザー kento_kunkento_kun
提出日時 2020-11-23 21:51:44
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 118 ms / 2,000 ms
コード長 228 bytes
コンパイル時間 277 ms
コンパイル使用メモリ 82,308 KB
実行使用メモリ 80,016 KB
最終ジャッジ日時 2024-05-06 14:41:12
合計ジャッジ時間 2,901 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
51,712 KB
testcase_01 AC 35 ms
51,968 KB
testcase_02 AC 36 ms
52,096 KB
testcase_03 AC 34 ms
52,352 KB
testcase_04 AC 34 ms
51,328 KB
testcase_05 AC 35 ms
51,840 KB
testcase_06 AC 36 ms
51,712 KB
testcase_07 AC 116 ms
79,884 KB
testcase_08 AC 65 ms
67,840 KB
testcase_09 AC 94 ms
78,208 KB
testcase_10 AC 108 ms
79,492 KB
testcase_11 AC 107 ms
79,104 KB
testcase_12 AC 96 ms
79,104 KB
testcase_13 AC 94 ms
79,012 KB
testcase_14 AC 117 ms
79,232 KB
testcase_15 AC 101 ms
79,236 KB
testcase_16 AC 75 ms
76,536 KB
testcase_17 AC 75 ms
76,428 KB
testcase_18 AC 74 ms
76,032 KB
testcase_19 AC 84 ms
77,952 KB
testcase_20 AC 74 ms
76,288 KB
testcase_21 AC 78 ms
76,672 KB
testcase_22 AC 118 ms
80,016 KB
testcase_23 AC 118 ms
80,008 KB
権限があれば一括ダウンロードができます

ソースコード

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
        break
    a = Alist[i]
print(cnt)
0