結果
問題 |
No.21 平均の差
|
ユーザー |
![]() |
提出日時 | 2014-11-01 03:00:47 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 27 ms / 5,000 ms |
コード長 | 799 bytes |
コンパイル時間 | 4,659 ms |
コンパイル使用メモリ | 104,064 KB |
実行使用メモリ | 18,304 KB |
最終ジャッジ日時 | 2024-12-30 15:51:23 |
合計ジャッジ時間 | 3,867 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
/* yukicoder No.21 作成者:ヒロソフ 使用言語:C# Ver. */ using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace yukicoder21cs { class Program { static void Main(string[] args) { int N, K; int[] Nums; N = int.Parse(Console.ReadLine()); K = int.Parse(Console.ReadLine()); Nums = new int[N]; for (int i = 0; i < Nums.Length; i++) Nums[i] = int.Parse(Console.ReadLine()); int Min, Max; Min = Nums.Min(); //Min = (from c in Nums select c).Min(); Max = Nums.Max(); //Max = (from c in Nums select c).Max(); Console.WriteLine(Max - Min); } } }