結果

問題 No.1285 ゴミ捨て
ユーザー hiragnhiragn
提出日時 2022-11-23 10:49:28
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 200 bytes
コンパイル時間 100 ms
コンパイル使用メモリ 11,816 KB
実行使用メモリ 75,392 KB
最終ジャッジ日時 2023-10-24 21:16:55
合計ジャッジ時間 18,942 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 857 ms
42,248 KB
testcase_01 AC 480 ms
42,372 KB
testcase_02 AC 481 ms
42,372 KB
testcase_03 AC 479 ms
42,372 KB
testcase_04 RE -
testcase_05 AC 484 ms
42,372 KB
testcase_06 AC 479 ms
42,372 KB
testcase_07 AC 689 ms
45,652 KB
testcase_08 AC 490 ms
42,372 KB
testcase_09 AC 575 ms
42,956 KB
testcase_10 AC 665 ms
45,124 KB
testcase_11 AC 643 ms
44,276 KB
testcase_12 AC 601 ms
43,484 KB
testcase_13 AC 599 ms
43,484 KB
testcase_14 AC 677 ms
45,388 KB
testcase_15 AC 625 ms
43,748 KB
testcase_16 AC 522 ms
42,372 KB
testcase_17 AC 517 ms
42,372 KB
testcase_18 AC 511 ms
42,372 KB
testcase_19 AC 560 ms
42,956 KB
testcase_20 AC 512 ms
42,372 KB
testcase_21 AC 521 ms
42,372 KB
testcase_22 AC 701 ms
45,652 KB
testcase_23 AC 702 ms
75,392 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import numpy as np


def main():
    n = int(input())
    a = [int(input()) for _ in range(n)]

    ans = 1 if min(np.diff(sorted(a))) > 1 else 2
    print(ans)


if __name__ == "__main__":
    main()
0