結果

問題 No.1285 ゴミ捨て
ユーザー masayamatumasayamatu
提出日時 2020-11-23 22:42:18
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 268 ms / 2,000 ms
コード長 240 bytes
コンパイル時間 752 ms
コンパイル使用メモリ 87,216 KB
実行使用メモリ 96,188 KB
最終ジャッジ日時 2023-08-19 07:26:30
合計ジャッジ時間 7,884 ms
ジャッジサーバーID
(参考情報)
judge14 / judge9
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 204 ms
89,020 KB
testcase_01 AC 203 ms
88,836 KB
testcase_02 AC 196 ms
89,004 KB
testcase_03 AC 200 ms
89,128 KB
testcase_04 AC 198 ms
88,956 KB
testcase_05 AC 201 ms
89,044 KB
testcase_06 AC 200 ms
89,120 KB
testcase_07 AC 268 ms
95,748 KB
testcase_08 AC 219 ms
92,488 KB
testcase_09 AC 239 ms
93,736 KB
testcase_10 AC 257 ms
95,436 KB
testcase_11 AC 247 ms
96,188 KB
testcase_12 AC 242 ms
94,480 KB
testcase_13 AC 248 ms
94,484 KB
testcase_14 AC 266 ms
95,312 KB
testcase_15 AC 257 ms
95,340 KB
testcase_16 AC 245 ms
92,400 KB
testcase_17 AC 235 ms
92,936 KB
testcase_18 AC 229 ms
92,556 KB
testcase_19 AC 240 ms
93,532 KB
testcase_20 AC 222 ms
92,428 KB
testcase_21 AC 227 ms
92,792 KB
testcase_22 AC 262 ms
95,308 KB
testcase_23 AC 262 ms
95,432 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from decimal import *
import math

n = int(input())

A = []

count = 1

for i in range(n):
    A.append(int(input()))
A.sort()

a = A[0]

for i in range(1,n):
    if A[i] - a <= 1:
        count += 1
        break
    a = A[i]

print(count)
0