結果

問題 No.1285 ゴミ捨て
ユーザー vakelkvnawkl:vakelkvnawkl:
提出日時 2020-11-27 20:41:26
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 221 ms / 2,000 ms
コード長 163 bytes
コンパイル時間 102 ms
コンパイル使用メモリ 10,692 KB
実行使用メモリ 12,492 KB
最終ジャッジ日時 2023-08-19 07:27:26
合計ジャッジ時間 3,344 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 13 ms
8,136 KB
testcase_01 AC 13 ms
7,912 KB
testcase_02 AC 14 ms
7,984 KB
testcase_03 AC 13 ms
7,880 KB
testcase_04 AC 13 ms
7,792 KB
testcase_05 AC 13 ms
7,796 KB
testcase_06 AC 13 ms
7,864 KB
testcase_07 AC 214 ms
12,244 KB
testcase_08 AC 21 ms
8,348 KB
testcase_09 AC 108 ms
9,780 KB
testcase_10 AC 193 ms
11,748 KB
testcase_11 AC 168 ms
11,488 KB
testcase_12 AC 135 ms
10,432 KB
testcase_13 AC 126 ms
10,552 KB
testcase_14 AC 194 ms
12,096 KB
testcase_15 AC 145 ms
10,856 KB
testcase_16 AC 54 ms
8,980 KB
testcase_17 AC 56 ms
8,840 KB
testcase_18 AC 51 ms
8,680 KB
testcase_19 AC 90 ms
9,916 KB
testcase_20 AC 45 ms
8,712 KB
testcase_21 AC 57 ms
9,084 KB
testcase_22 AC 212 ms
12,492 KB
testcase_23 AC 221 ms
12,384 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
a=[]
for i in range(N):
	X = int(input())
	a+=[X]

a.sort()
import sys
for i in range(N-1):
	if a[i+1]==a[i]+1:
		print(2)
		sys.exit()

print(1)
0