結果

問題 No.21 平均の差
ユーザー バカらっくバカらっく
提出日時 2018-04-01 20:46:50
言語 Swift
(6.0.3)
結果
AC  
実行時間 9 ms / 5,000 ms
コード長 231 bytes
コンパイル時間 1,142 ms
コンパイル使用メモリ 128,452 KB
実行使用メモリ 9,344 KB
最終ジャッジ日時 2024-11-30 12:15:40
合計ジャッジ時間 1,629 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

let inputCount = Int(readLine()!)!
let groupCount = Int(readLine()!)!

var items = [Int]()

for _ in (0..<inputCount) {
    items.append(Int(readLine()!)!)
}

items = items.sorted()

let ans = items.last! - items.first!
print(ans)
0