結果
問題 |
No.21 平均の差
|
ユーザー |
|
提出日時 | 2018-03-16 14:33:00 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 274 bytes |
コンパイル時間 | 484 ms |
コンパイル使用メモリ | 56,412 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-21 14:27:47 |
合計ジャッジ時間 | 1,051 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 |
ソースコード
#include <iostream> #include <algorithm> using namespace std; int main() { int N,K,n,big=1,small=1000; cin>>N>>K; for(int i=0;i<N;++i) { cin>>n; big = max(big, n); small = min(small, n); } cout<<big-small<<endl; fflush(stdin); getchar(); return 0; }