結果

問題 No.1285 ゴミ捨て
ユーザー ID 21712ID 21712
提出日時 2024-12-18 10:50:08
言語 Go
(1.22.1)
結果
AC  
実行時間 968 ms / 2,000 ms
コード長 228 bytes
コンパイル時間 10,125 ms
コンパイル使用メモリ 236,160 KB
実行使用メモリ 7,956 KB
最終ジャッジ日時 2024-12-18 10:50:29
合計ジャッジ時間 19,913 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
6,816 KB
testcase_01 AC 1 ms
6,820 KB
testcase_02 AC 2 ms
6,820 KB
testcase_03 AC 2 ms
6,816 KB
testcase_04 AC 1 ms
6,816 KB
testcase_05 AC 2 ms
6,816 KB
testcase_06 AC 2 ms
6,816 KB
testcase_07 AC 939 ms
7,832 KB
testcase_08 AC 33 ms
6,820 KB
testcase_09 AC 397 ms
6,820 KB
testcase_10 AC 827 ms
7,832 KB
testcase_11 AC 741 ms
7,836 KB
testcase_12 AC 534 ms
7,836 KB
testcase_13 AC 542 ms
7,836 KB
testcase_14 AC 860 ms
7,832 KB
testcase_15 AC 625 ms
7,836 KB
testcase_16 AC 166 ms
6,816 KB
testcase_17 AC 173 ms
6,820 KB
testcase_18 AC 164 ms
6,820 KB
testcase_19 AC 349 ms
6,820 KB
testcase_20 AC 150 ms
6,816 KB
testcase_21 AC 227 ms
6,820 KB
testcase_22 AC 949 ms
7,956 KB
testcase_23 AC 968 ms
7,956 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package main

import . "fmt"
import . "sort"

func main() {
	var n int
	Scan(&n)
	a:=make([]int,n)
	for i:=range a {
		Scan(&a[i])
	}
	Ints(a)
	for i,v:=range a[1:] {
		if a[i]+1==v {
			Println(2)
			return
		}
	}
	Println(1)
}
0