結果

問題 No.21 平均の差
ユーザー huffman56huffman56
提出日時 2022-04-17 09:37:01
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 793 bytes
コンパイル時間 3,125 ms
コンパイル使用メモリ 106,292 KB
実行使用メモリ 23,476 KB
最終ジャッジ日時 2023-08-27 00:43:20
合計ジャッジ時間 3,465 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 57 ms
21,452 KB
testcase_01 AC 57 ms
21,336 KB
testcase_02 WA -
testcase_03 AC 58 ms
21,328 KB
testcase_04 AC 59 ms
21,368 KB
testcase_05 AC 59 ms
23,412 KB
testcase_06 AC 58 ms
23,332 KB
testcase_07 WA -
testcase_08 AC 57 ms
21,376 KB
testcase_09 AC 57 ms
21,336 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.IO;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
using System.Numerics;
using System.Diagnostics;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using static System.Math;
using static System.Console;

namespace yukicoder
{
    class Program
    {
        static void Main()
        {
            int N = int.Parse(Console.ReadLine());
            int K = int.Parse(Console.ReadLine());
            int[] nums = new int[K];
            

            for (int i = 0; i < K; i++)
            {
                nums[i] = int.Parse(Console.ReadLine());
            }

            int Min = nums.Min();
            int Max = nums.Max();

            Console.WriteLine(Max - Min);

        }
    }
}
0