結果
| 問題 |
No.21 平均の差
|
| ユーザー |
_shim0123_
|
| 提出日時 | 2015-05-05 09:37:15 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 262 bytes |
| コンパイル時間 | 443 ms |
| コンパイル使用メモリ | 60,088 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-05 19:06:39 |
| 合計ジャッジ時間 | 955 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 |
ソースコード
#include <iostream>
#include <algorithm>
using namespace std;
int main(void) {
int N = 0, K = 0;
int n[9] = {0};
int ans = 0;
cin >> N >> K;
for(int i = 0; i < N; i++){
cin >> n[i];
}
sort(n, n + N);
cout << n[N - 1] - n[0] << endl;
return 0;
}
_shim0123_