結果

問題 No.1285 ゴミ捨て
ユーザー pluto77pluto77
提出日時 2020-11-26 10:26:06
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 257 ms / 2,000 ms
コード長 174 bytes
コンパイル時間 195 ms
コンパイル使用メモリ 10,740 KB
実行使用メモリ 12,400 KB
最終ジャッジ日時 2023-08-19 07:27:03
合計ジャッジ時間 3,981 ms
ジャッジサーバーID
(参考情報)
judge10 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,868 KB
testcase_01 AC 15 ms
7,824 KB
testcase_02 AC 15 ms
7,768 KB
testcase_03 AC 16 ms
7,832 KB
testcase_04 AC 15 ms
7,836 KB
testcase_05 AC 15 ms
7,808 KB
testcase_06 AC 15 ms
7,816 KB
testcase_07 AC 244 ms
12,320 KB
testcase_08 AC 23 ms
7,980 KB
testcase_09 AC 112 ms
9,932 KB
testcase_10 AC 214 ms
11,736 KB
testcase_11 AC 197 ms
11,616 KB
testcase_12 AC 148 ms
10,484 KB
testcase_13 AC 146 ms
10,420 KB
testcase_14 AC 235 ms
11,996 KB
testcase_15 AC 173 ms
10,688 KB
testcase_16 AC 59 ms
8,828 KB
testcase_17 AC 57 ms
9,052 KB
testcase_18 AC 53 ms
8,748 KB
testcase_19 AC 102 ms
9,804 KB
testcase_20 AC 51 ms
8,708 KB
testcase_21 AC 68 ms
9,044 KB
testcase_22 AC 254 ms
12,400 KB
testcase_23 AC 257 ms
12,400 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#yuki1285
n=int(input())
a=[]
for i in range(n):
 a.append(int(input()))
a.sort()
flag=0
for i in range(n-1):
 if a[i+1]-a[i]<=1:
  flag=1
if flag:
 print(2)
else:
 print(1)
0