結果

問題 No.21 平均の差
ユーザー うわばみうわばみ
提出日時 2020-04-29 13:19:26
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 54 ms / 5,000 ms
コード長 393 bytes
コンパイル時間 1,117 ms
コンパイル使用メモリ 63,184 KB
実行使用メモリ 22,800 KB
最終ジャッジ日時 2023-08-18 19:44:34
合計ジャッジ時間 2,624 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 49 ms
20,780 KB
testcase_01 AC 51 ms
18,592 KB
testcase_02 AC 50 ms
20,732 KB
testcase_03 AC 54 ms
22,764 KB
testcase_04 AC 53 ms
22,772 KB
testcase_05 AC 54 ms
20,660 KB
testcase_06 AC 51 ms
20,740 KB
testcase_07 AC 52 ms
20,848 KB
testcase_08 AC 52 ms
22,800 KB
testcase_09 AC 51 ms
20,832 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

using System;
using System.Linq;

class Program
{
    static void Main()
    {
        int n = int.Parse(Console.ReadLine());
        Console.ReadLine();
        int[] list = new int[n];
        for(int i = 0; i < n; i++)
        {
            list[i] = int.Parse(Console.ReadLine());
        }
        Array.Sort(list);
        Console.WriteLine($"{list[list.Length - 1] - list[0]}");
    }
}
0