結果

問題 No.1285 ゴミ捨て
ユーザー kento_kunkento_kun
提出日時 2020-11-23 21:51:44
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 131 ms / 2,000 ms
コード長 228 bytes
コンパイル時間 1,568 ms
コンパイル使用メモリ 87,204 KB
実行使用メモリ 81,280 KB
最終ジャッジ日時 2023-08-19 07:26:18
合計ジャッジ時間 3,748 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 62 ms
71,360 KB
testcase_01 AC 62 ms
71,388 KB
testcase_02 AC 65 ms
71,000 KB
testcase_03 AC 64 ms
71,480 KB
testcase_04 AC 65 ms
71,340 KB
testcase_05 AC 61 ms
71,432 KB
testcase_06 AC 63 ms
71,252 KB
testcase_07 AC 128 ms
81,208 KB
testcase_08 AC 83 ms
76,940 KB
testcase_09 AC 100 ms
79,444 KB
testcase_10 AC 121 ms
80,460 KB
testcase_11 AC 119 ms
80,552 KB
testcase_12 AC 104 ms
80,584 KB
testcase_13 AC 106 ms
80,352 KB
testcase_14 AC 128 ms
80,616 KB
testcase_15 AC 113 ms
80,652 KB
testcase_16 AC 88 ms
77,732 KB
testcase_17 AC 86 ms
77,576 KB
testcase_18 AC 88 ms
77,624 KB
testcase_19 AC 98 ms
79,304 KB
testcase_20 AC 89 ms
77,248 KB
testcase_21 AC 93 ms
78,096 KB
testcase_22 AC 131 ms
81,104 KB
testcase_23 AC 129 ms
81,280 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