結果
| 問題 |
No.21 平均の差
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-06-07 17:03:09 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 291 bytes |
| コンパイル時間 | 396 ms |
| コンパイル使用メモリ | 57,940 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-06 14:33:57 |
| 合計ジャッジ時間 | 867 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 10 |
ソースコード
#include <iostream>
#include <algorithm>
using namespace std;
int main(){
int N, K, num;
int minnum = 0, maxnum = 1000;
cin >> N >> K;
for(int i = 0; i < N; i++){
cin >> num;
minnum = min(minnum, num);
maxnum = max(maxnum, num);
}
cout << maxnum - minnum << endl;
}