結果

問題 No.1285 ゴミ捨て
ユーザー masayamatumasayamatu
提出日時 2020-11-23 22:42:18
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 191 ms / 2,000 ms
コード長 240 bytes
コンパイル時間 296 ms
コンパイル使用メモリ 82,168 KB
実行使用メモリ 85,452 KB
最終ジャッジ日時 2024-05-06 14:41:22
合計ジャッジ時間 4,891 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
80,000 KB
testcase_01 AC 108 ms
80,000 KB
testcase_02 AC 107 ms
80,000 KB
testcase_03 AC 107 ms
79,744 KB
testcase_04 AC 108 ms
80,000 KB
testcase_05 AC 116 ms
79,896 KB
testcase_06 AC 114 ms
79,872 KB
testcase_07 AC 176 ms
84,864 KB
testcase_08 AC 141 ms
82,432 KB
testcase_09 AC 149 ms
83,200 KB
testcase_10 AC 174 ms
85,304 KB
testcase_11 AC 169 ms
85,120 KB
testcase_12 AC 158 ms
83,840 KB
testcase_13 AC 154 ms
83,840 KB
testcase_14 AC 171 ms
85,120 KB
testcase_15 AC 162 ms
84,736 KB
testcase_16 AC 139 ms
82,560 KB
testcase_17 AC 139 ms
82,304 KB
testcase_18 AC 138 ms
82,356 KB
testcase_19 AC 156 ms
83,200 KB
testcase_20 AC 150 ms
82,432 KB
testcase_21 AC 151 ms
82,304 KB
testcase_22 AC 191 ms
85,248 KB
testcase_23 AC 181 ms
85,452 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