結果

問題 No.1285 ゴミ捨て
ユーザー yuusanlondon
提出日時 2020-11-13 21:25:46
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 125 ms / 2,000 ms
コード長 192 bytes
コンパイル時間 178 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 80,000 KB
最終ジャッジ日時 2024-11-28 21:40:18
合計ジャッジ時間 3,191 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

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