結果

問題 No.1285 ゴミ捨て
ユーザー yuusanlondonyuusanlondon
提出日時 2020-11-13 21:25:46
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 147 ms / 2,000 ms
コード長 192 bytes
コンパイル時間 1,717 ms
コンパイル使用メモリ 86,688 KB
実行使用メモリ 81,132 KB
最終ジャッジ日時 2023-08-19 07:10:53
合計ジャッジ時間 4,037 ms
ジャッジサーバーID
(参考情報)
judge12 / judge9
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
70,936 KB
testcase_01 AC 70 ms
71,140 KB
testcase_02 AC 68 ms
70,932 KB
testcase_03 AC 68 ms
71,052 KB
testcase_04 AC 69 ms
71,324 KB
testcase_05 AC 69 ms
71,264 KB
testcase_06 AC 70 ms
71,104 KB
testcase_07 AC 141 ms
80,636 KB
testcase_08 AC 91 ms
76,740 KB
testcase_09 AC 113 ms
79,672 KB
testcase_10 AC 137 ms
80,444 KB
testcase_11 AC 133 ms
80,444 KB
testcase_12 AC 122 ms
79,988 KB
testcase_13 AC 122 ms
80,320 KB
testcase_14 AC 140 ms
80,348 KB
testcase_15 AC 126 ms
80,432 KB
testcase_16 AC 99 ms
77,460 KB
testcase_17 AC 100 ms
77,572 KB
testcase_18 AC 100 ms
77,316 KB
testcase_19 AC 111 ms
79,228 KB
testcase_20 AC 99 ms
77,196 KB
testcase_21 AC 105 ms
78,016 KB
testcase_22 AC 144 ms
81,132 KB
testcase_23 AC 147 ms
81,064 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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