結果

問題 No.21 平均の差
ユーザー kshiva1126kshiva1126
提出日時 2019-03-30 18:13:51
言語 Go
(1.21.3)
結果
WA  
実行時間 -
コード長 297 bytes
コンパイル時間 10,414 ms
コンパイル使用メモリ 213,896 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-08-09 23:00:31
合計ジャッジ時間 11,326 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

package main
import (
    "fmt"
    "sort"
)
func main(){
    var n, g int
    fmt.Scan(&n)
    fmt.Scan(&g)
    t := make([]int, n)
    for i := 0; i < n; i++ {
        fmt.Scan(&t[i])
    }
    sort.Ints(t)
    fmt.Println(t)
    min := t[0]
    max := t[len(t) - 1]
    fmt.Println(max - min)
}
0