結果
| 問題 | No.615 集合に分けよう | 
| コンテスト | |
| ユーザー |  convexineq | 
| 提出日時 | 2020-12-27 07:10:11 | 
| 言語 | PyPy3 (7.3.15) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 77 ms / 2,000 ms | 
| コード長 | 133 bytes | 
| コンパイル時間 | 154 ms | 
| コンパイル使用メモリ | 81,768 KB | 
| 実行使用メモリ | 78,592 KB | 
| 最終ジャッジ日時 | 2024-09-25 10:44:44 | 
| 合計ジャッジ時間 | 2,868 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 5 | 
| other | AC * 26 | 
ソースコード
n,k = map(int,input().split()) *a, = map(int,input().split()) a.sort() b = [i-j for i,j in zip(a[1:],a)] b.sort() print(sum(b[:n-k]))
