結果

問題 No.21 平均の差
ユーザー laneguelanegue
提出日時 2020-04-02 04:25:46
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 57 ms / 5,000 ms
コード長 371 bytes
コンパイル時間 2,158 ms
コンパイル使用メモリ 62,772 KB
実行使用メモリ 22,624 KB
最終ジャッジ日時 2023-09-09 23:53:34
合計ジャッジ時間 2,903 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 55 ms
20,736 KB
testcase_01 AC 56 ms
20,644 KB
testcase_02 AC 56 ms
20,668 KB
testcase_03 AC 55 ms
20,704 KB
testcase_04 AC 56 ms
20,588 KB
testcase_05 AC 55 ms
20,568 KB
testcase_06 AC 55 ms
20,640 KB
testcase_07 AC 55 ms
20,712 KB
testcase_08 AC 56 ms
20,752 KB
testcase_09 AC 57 ms
22,624 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

using System;
public class Program
{
    static void Main()
    {
        int N = int.Parse(Console.ReadLine());
        int k = int.Parse(Console.ReadLine());
        int[] n = new int[N];
        for (int i = 0; i < N; i++)
        {
            n[i] = int.Parse(Console.ReadLine());
        }
        Array.Sort(n);
        Console.WriteLine(n[N - 1] - n[0]);
    }
}
0